consumer模块完成度95%,优化安卓端界面和小程序测试4

This commit is contained in:
cyh666666
2026-03-17 12:03:57 +08:00
parent b5c7947ad8
commit c3d2be354e
2083 changed files with 1110 additions and 44315 deletions

View File

@@ -3,7 +3,7 @@
<view class="consumer-profile">
<!-- 智能顶部导航栏 - 与消息页保持一致 -->
<view class="smart-navbar" :style="{ paddingTop: statusBarHeight + 'px' }">
<view class="nav-container">
<view class="nav-container" :style="{ paddingRight: (navBarRight > 0 ? navBarRight : 16) + 'px' }">
<!-- 基础用户信息:头像和昵称 -->
<view class="nav-user-basic" @click="editProfile">
<image
@@ -14,7 +14,7 @@
</view>
<!-- 用户资产横向排列 (积分、余额、优惠券) -->
<view class="nav-user-stats" :style="{ marginRight: navBarRight + 'px' }">
<view class="nav-user-stats">
<view class="nav-stat-item" @click="goToPoints">
<text class="nav-stat-label">积分</text>
<text class="nav-stat-value">{{ userStats.points }}</text>
@@ -31,12 +31,14 @@
</view>
</view>
<!-- 设置按钮 (最右侧) -->
<!-- #ifndef MP-WEIXIN -->
<!-- 设置按钮 (安卓端和电脑端显示,小程序不显示) -->
<view class="nav-actions">
<view class="action-btn" @click="goToSettings">
<text class="action-icon">⚙️</text>
</view>
</view>
<!-- #endif -->
</view>
</view>
@@ -48,6 +50,11 @@
<view class="my-services" style="margin-top: 10px;">
<view class="section-title">我的服务</view>
<view class="service-grid">
<view class="service-item" @click="goToMessages">
<text class="service-icon">💬</text>
<text class="service-text">消息中心</text>
<text v-if="serviceCounts.unreadMessages > 0" class="service-badge">{{ serviceCounts.unreadMessages }}</text>
</view>
<view class="service-item" @click="goToCoupons">
<text class="service-icon">🎫</text>
<text class="service-text">优惠券</text>
@@ -301,6 +308,7 @@ type OrderCountsType = {
type ServiceCountsType = {
coupons: number
favorites: number
unreadMessages: number
}
type ConsumptionStatsType = {
@@ -354,7 +362,8 @@ export default {
} as OrderCountsType,
serviceCounts: {
coupons: 0,
favorites: 0
favorites: 0,
unreadMessages: 0
} as ServiceCountsType,
recentOrders: [] as Array<OrderItemType>,
statsPeriods: [
@@ -543,6 +552,10 @@ export default {
this.navBarRight = 90
}
// #endif
// #ifndef MP-WEIXIN
this.navBarRight = 0
// #endif
},
async loadUserProfile() {
try {
@@ -1166,6 +1179,12 @@ export default {
url: '/pages/mall/consumer/coupons'
})
},
goToMessages() {
uni.navigateTo({
url: '/pages/main/messages'
})
},
goToPoints() {
uni.navigateTo({