|
|
@@ -142,20 +142,13 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 个人成就统计 -->
|
|
|
+ <!-- 我的成就(纯成就指标) -->
|
|
|
<view class="achievement-section">
|
|
|
<view class="section-header-row">
|
|
|
<text class="section-title">🏆 我的成就</text>
|
|
|
<text class="section-sub">持续成长,看见改变</text>
|
|
|
</view>
|
|
|
<view class="achievement-grid">
|
|
|
- <view class="ach-item" @click="goToPoints">
|
|
|
- <view class="ach-icon-wrap" style="background:rgba(249,115,22,0.12)">
|
|
|
- <text class="ach-icon">💰</text>
|
|
|
- </view>
|
|
|
- <text class="ach-num">{{ totalPoints }}</text>
|
|
|
- <text class="ach-label">累计积分</text>
|
|
|
- </view>
|
|
|
<view class="ach-item" @click="goToStreak">
|
|
|
<view class="ach-icon-wrap" style="background:rgba(255,140,66,0.12)">
|
|
|
<text class="ach-icon">🔥</text>
|
|
|
@@ -170,13 +163,6 @@
|
|
|
<text class="ach-num">{{ completedTasks }}</text>
|
|
|
<text class="ach-label">完成任务</text>
|
|
|
</view>
|
|
|
- <view class="ach-item" @click="goToWishes">
|
|
|
- <view class="ach-icon-wrap" style="background:rgba(245,158,11,0.12)">
|
|
|
- <text class="ach-icon">🎁</text>
|
|
|
- </view>
|
|
|
- <text class="ach-num">{{ rewardsEarned }}</text>
|
|
|
- <text class="ach-label">获得奖励</text>
|
|
|
- </view>
|
|
|
<view class="ach-item" @click="goToBadges">
|
|
|
<view class="ach-icon-wrap" style="background:rgba(236,72,153,0.12)">
|
|
|
<text class="ach-icon">🏅</text>
|
|
|
@@ -198,12 +184,22 @@
|
|
|
<text class="ach-num">{{ challengesJoined }}</text>
|
|
|
<text class="ach-label">参加挑战</text>
|
|
|
</view>
|
|
|
- <view class="ach-item" @click="goToHealthReports">
|
|
|
- <view class="ach-icon-wrap" style="background:rgba(14,165,233,0.12)">
|
|
|
- <text class="ach-icon">📋</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 我的团队(团队管理 + 推广收益) -->
|
|
|
+ <view class="achievement-section">
|
|
|
+ <view class="section-header-row">
|
|
|
+ <text class="section-title">👥 我的团队</text>
|
|
|
+ <text class="section-sub">团队网络与推广收益</text>
|
|
|
+ </view>
|
|
|
+ <view class="achievement-grid">
|
|
|
+ <view class="ach-item" @click="goTeamTree">
|
|
|
+ <view class="ach-icon-wrap" style="background:rgba(16,185,129,0.12)">
|
|
|
+ <text class="ach-icon">🌳</text>
|
|
|
</view>
|
|
|
- <text class="ach-num">{{ healthReports }}</text>
|
|
|
- <text class="ach-label">上传报告</text>
|
|
|
+ <text class="ach-num">{{ teamMembers }}</text>
|
|
|
+ <text class="ach-label">我的团队</text>
|
|
|
</view>
|
|
|
<view class="ach-item" @click="goToWealthCenter">
|
|
|
<view class="ach-icon-wrap" style="background:rgba(245,158,11,0.12)">
|
|
|
@@ -212,13 +208,6 @@
|
|
|
<text class="ach-num">{{ referralEarnings }}</text>
|
|
|
<text class="ach-label">推广收益</text>
|
|
|
</view>
|
|
|
- <view class="ach-item" @click="goTeamTree">
|
|
|
- <view class="ach-icon-wrap" style="background:rgba(16,185,129,0.12)">
|
|
|
- <text class="ach-icon">🌳</text>
|
|
|
- </view>
|
|
|
- <text class="ach-num">{{ teamMembers }}</text>
|
|
|
- <text class="ach-label">我的团队</text>
|
|
|
- </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -280,6 +269,38 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
+ <!-- 卡券中心(我的优惠券 + 获得奖励) -->
|
|
|
+ <view class="achievement-section">
|
|
|
+ <view class="section-header-row">
|
|
|
+ <text class="section-title">🎫 卡券中心</text>
|
|
|
+ <text class="section-sub">优惠券与权益</text>
|
|
|
+ </view>
|
|
|
+ <view class="achievement-grid">
|
|
|
+ <view class="ach-item" @click="goToCoupons">
|
|
|
+ <view class="ach-icon-wrap" style="background:rgba(245,158,11,0.12)">
|
|
|
+ <text class="ach-icon">🎟️</text>
|
|
|
+ </view>
|
|
|
+ <text class="ach-num">{{ couponCount }}</text>
|
|
|
+ <text class="ach-label">我的优惠券</text>
|
|
|
+ </view>
|
|
|
+ <view class="ach-item" @click="goToWishes">
|
|
|
+ <view class="ach-icon-wrap" style="background:rgba(245,158,11,0.12)">
|
|
|
+ <text class="ach-icon">🎁</text>
|
|
|
+ </view>
|
|
|
+ <text class="ach-num">{{ rewardsEarned }}</text>
|
|
|
+ <text class="ach-label">获得奖励</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 健康档案(上传报告) -->
|
|
|
+ <view class="menu-row" @click="goToHealthReports">
|
|
|
+ <text class="menu-row-icon">📋</text>
|
|
|
+ <text class="menu-row-text">我的健康报告</text>
|
|
|
+ <text class="menu-row-sub">{{ healthReports }} 份</text>
|
|
|
+ <text class="menu-row-arrow">›</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
<!-- 规划师服务中心入口(仅规划师可见) -->
|
|
|
<view class="service-center-section" v-if="role === 'teacher' && teacherStatus === 'approved'">
|
|
|
<view class="service-center-card" @click="goToServiceCenter">
|
|
|
@@ -346,7 +367,7 @@ import {
|
|
|
getTodayTasksByCategory, getChallengeList, getMyMembership,
|
|
|
verifyPassword, getPointsBalance, getUserInfo,
|
|
|
cartCount, getOrderCounts, getReferralSummary,
|
|
|
- getProfileStats, getMyReferrer, getVendorTeamList, getVendorHierarchyInfo,
|
|
|
+ getProfileStats, getMyReferrer, getVendorTeamList, getVendorHierarchyInfo, getMyCoupons,
|
|
|
getTeacherInfo, getTeacherPendingTasks, getTeacherUnreadCount,
|
|
|
getReferralCode, extractReferralCode, getShareQrCode, getEnergySandbox,
|
|
|
vendorStatus
|
|
|
@@ -386,6 +407,7 @@ export default {
|
|
|
orderShipped: 0,
|
|
|
orderAfterSale: 0,
|
|
|
cartCount: 0,
|
|
|
+ couponCount: 0,
|
|
|
// 待办
|
|
|
pendingTasks: 0,
|
|
|
unreadMessages: 0,
|
|
|
@@ -510,6 +532,7 @@ export default {
|
|
|
this.loadProfileStats()
|
|
|
this.loadReferralEarnings()
|
|
|
this.loadTeamInfo()
|
|
|
+ this.loadCoupons()
|
|
|
},
|
|
|
loadUserInfo() {
|
|
|
var self = this
|
|
|
@@ -631,6 +654,15 @@ export default {
|
|
|
self.teamMembers = 0
|
|
|
})
|
|
|
},
|
|
|
+ loadCoupons() {
|
|
|
+ var self = this
|
|
|
+ getMyCoupons().then(function(res) {
|
|
|
+ if (res && res.code === 200 && res.data) {
|
|
|
+ var list = Array.isArray(res.data) ? res.data : (res.data.list || [])
|
|
|
+ self.couponCount = list.length
|
|
|
+ }
|
|
|
+ }).catch(function() {})
|
|
|
+ },
|
|
|
async loadMyReferrer() {
|
|
|
try {
|
|
|
var memberId = uni.getStorageSync('currentMemberId') || uni.getStorageSync('currentChildId') || 0
|
|
|
@@ -802,6 +834,9 @@ export default {
|
|
|
goToWealthCenter: function() {
|
|
|
uni.navigateTo({ url: '/pages/promotion/index' })
|
|
|
},
|
|
|
+ goToCoupons: function() {
|
|
|
+ uni.navigateTo({ url: '/pages/profile-extra/coupons' })
|
|
|
+ },
|
|
|
goUpgrade: function() {
|
|
|
uni.navigateTo({ url: '/pages/membership/upgrade' })
|
|
|
},
|
|
|
@@ -1428,6 +1463,11 @@ $gp-ghost: str-slice($gp-ghost-hex, 2);
|
|
|
font-size: calc(26rpx * var(--font-scale, 1));
|
|
|
color: $facade-text-strong;
|
|
|
}
|
|
|
+.menu-row-sub {
|
|
|
+ font-size: calc(24rpx * var(--font-scale, 1));
|
|
|
+ color: $facade-text-muted;
|
|
|
+ margin-right: 8rpx;
|
|
|
+}
|
|
|
.menu-row-arrow {
|
|
|
font-size: calc(28rpx * var(--font-scale, 1));
|
|
|
color: $facade-text-ghost;
|