Просмотр исходного кода

feat(profile): 我的团队推广收益改CF口径对齐 + 邀请成员直接分享

- 推广收益口径对齐:loadReferralEarnings 由 getReferralSummary().totalEarnings
  (旧 CommissionRecord settled 佣金口径)改为 getCfSummary().totalEarned
  (CF 值总览口径,与推广中心 promotion/index.vue 收益总览'累计获取CF'一致)。
  promotion 的 cfVal 不做分->元换算(cfVal=String(num)),故此处同样不除 100,
  保证'我的团队'推广收益数字 = 推广中心'累计获取CF'数字。
- 邀请成员直接分享:团队区块新增'🤝 邀请成员'入口,@click=showShareQr 复用现有
  ContentSharePoster(scene=ref=推荐码,路径 pages/index-home/index),好友扫码
  进首页自动绑定推荐人,满足推荐/下级绑定。
- 团队区块网格 2 项变 3 项:新增 .achievement-grid.team-grid 让 3 列等宽
  (我的团队/推广收益/邀请成员),保持既有视觉协调。
- 仅改 cfc-frontend/pages/profile-main/profile.vue;后端零改动;api.js 仅补 import getCfSummary。
E2E Test Bot 6 дней назад
Родитель
Сommit
037aeca7e0
1 измененных файлов с 20 добавлено и 5 удалено
  1. 20 5
      cfc-frontend/pages/profile-main/profile.vue

+ 20 - 5
cfc-frontend/pages/profile-main/profile.vue

@@ -187,13 +187,13 @@
         </view>
         </view>
       </view>
       </view>
 
 
-      <!-- 我的团队(团队管理 + 推广收益) -->
+      <!-- 我的团队(团队管理 + 推广收益 + 邀请成员) -->
       <view class="achievement-section">
       <view class="achievement-section">
         <view class="section-header-row">
         <view class="section-header-row">
           <text class="section-title">👥 我的团队</text>
           <text class="section-title">👥 我的团队</text>
           <text class="section-sub">团队网络与推广收益</text>
           <text class="section-sub">团队网络与推广收益</text>
         </view>
         </view>
-        <view class="achievement-grid">
+        <view class="achievement-grid team-grid">
           <view class="ach-item" @click="goTeamTree">
           <view class="ach-item" @click="goTeamTree">
             <view class="ach-icon-wrap" style="background:rgba(16,185,129,0.12)">
             <view class="ach-icon-wrap" style="background:rgba(16,185,129,0.12)">
               <text class="ach-icon">🌳</text>
               <text class="ach-icon">🌳</text>
@@ -208,6 +208,13 @@
             <text class="ach-num">{{ referralEarnings }}</text>
             <text class="ach-num">{{ referralEarnings }}</text>
             <text class="ach-label">推广收益</text>
             <text class="ach-label">推广收益</text>
           </view>
           </view>
+          <view class="ach-item" @click="showShareQr">
+            <view class="ach-icon-wrap" style="background:rgba(99,102,241,0.12)">
+              <text class="ach-icon">🤝</text>
+            </view>
+            <text class="ach-num">+</text>
+            <text class="ach-label">邀请成员</text>
+          </view>
         </view>
         </view>
       </view>
       </view>
 
 
@@ -366,7 +373,7 @@ import {
   getChildren, getFamilyMemberList,
   getChildren, getFamilyMemberList,
   getTodayTasksByCategory, getChallengeList, getMyMembership,
   getTodayTasksByCategory, getChallengeList, getMyMembership,
   verifyPassword, getPointsBalance, getUserInfo,
   verifyPassword, getPointsBalance, getUserInfo,
-  cartCount, getOrderCounts, getReferralSummary,
+  cartCount, getOrderCounts, getCfSummary,
   getProfileStats, getMyReferrer, getVendorTeamList, getVendorHierarchyInfo, getMyCoupons,
   getProfileStats, getMyReferrer, getVendorTeamList, getVendorHierarchyInfo, getMyCoupons,
   getTeacherInfo, getTeacherPendingTasks, getTeacherUnreadCount,
   getTeacherInfo, getTeacherPendingTasks, getTeacherUnreadCount,
   getReferralCode, extractReferralCode, getShareQrCode, getEnergySandbox,
   getReferralCode, extractReferralCode, getShareQrCode, getEnergySandbox,
@@ -624,9 +631,12 @@ export default {
 
 
     loadReferralEarnings() {
     loadReferralEarnings() {
       var self = this
       var self = this
-      getReferralSummary().then(function(res) {
+      // CF 总览口径:与推广中心 promotion/index.vue 收益总览("累计获取CF")保持一致。
+      // promotion 用 cfVal(summary.totalEarned) 直接展示原始值(cfVal 不做分→元换算),
+      // 因此这里也不除 100,保证"我的团队"推广收益 = 推广中心"累计获取CF"数字一致。
+      getCfSummary().then(function(res) {
         if (res && res.code === 200 && res.data) {
         if (res && res.code === 200 && res.data) {
-          self.referralEarnings = res.data.totalEarnings || 0
+          self.referralEarnings = res.data.totalEarned || 0
         }
         }
       }).catch(function() {})
       }).catch(function() {})
     },
     },
@@ -1291,6 +1301,11 @@ $gp-ghost: str-slice($gp-ghost-hex, 2);
   line-height: 1;
   line-height: 1;
 }
 }
 
 
+/* 我的团队网格:3 列(我的团队 / 推广收益 / 邀请成员)等宽,保持既有视觉协调 */
+.achievement-grid.team-grid .ach-item {
+  width: 33.33%;
+}
+
 /* 我的订单(电商风格) */
 /* 我的订单(电商风格) */
 .order-section {
 .order-section {
   margin: 0 $uni-space-lg 20rpx;
   margin: 0 $uni-space-lg 20rpx;