Browse Source

chore: auto bump version and changelog [skip ci]

iwt 1 month ago
parent
commit
1b05683b83

+ 52 - 3
cfc-frontend/pages/promotion/index.vue

@@ -170,6 +170,12 @@
         </view>
         <text class="menu-text">邀请好友</text>
       </view>
+      <view class="menu-item" @click="shareToFriend">
+        <view class="menu-icon-wrap icon-share">
+          <text class="menu-icon-text">📤</text>
+        </view>
+        <text class="menu-text">分享给好友</text>
+      </view>
       <view class="menu-item" @click="goTeam">
         <view class="menu-icon-wrap icon-team">
           <text class="menu-icon-text">🤝</text>
@@ -193,13 +199,16 @@
     <!-- 底部安全区 -->
     <view style="height:40rpx"></view>
   </scroll-view>
+
+  <SharePoster :show="showPoster" :referralCode="shareReferralCode" :qrCodeBase64="inviteQrCode" :nickname="shareNickname" :userAvatar="shareAvatar" :familyName="familyName" @close="showPoster = false" />
 </template>
 
 <script>
-import { getReferralSummary, getCommissionSummary, getFamilyEarningsSummary, getFamilyEarningsMembers, getFamilyEarningsRecords, distributeToMember, toggleMemberBalance, withdrawFamilyEarnings } from '../../utils/api.js'
+import { getReferralSummary, getCommissionSummary, getFamilyEarningsSummary, getFamilyEarningsMembers, getFamilyEarningsRecords, distributeToMember, toggleMemberBalance, withdrawFamilyEarnings, getInviteQrCode, getFamilyMembers, getReferralCode } from '../../utils/api.js'
+import SharePoster from '@/components/SharePoster.vue'
 
 export default {
-  components: {},
+  components: { SharePoster },
   data() {
     return {
       totalEarnings: '0.00',
@@ -219,7 +228,14 @@ export default {
       withdrawAmount: '',
       distributeAmount: '',
       distributeMemberIdx: -1,
-      memberOptions: []
+      memberOptions: [],
+      // 分享海报
+      showPoster: false,
+      inviteQrCode: '',
+      familyName: '',
+      shareNickname: '',
+      shareAvatar: '',
+      shareReferralCode: ''
     }
   },
   computed: {
@@ -464,6 +480,38 @@ export default {
     goInvite() {
       uni.navigateTo({ url: '/pages/promotion/invite' })
     },
+    async shareToFriend() {
+      uni.showLoading({ title: '生成中...' })
+      try {
+        if (!this.shareReferralCode) {
+          try {
+            var codeRes = await getReferralCode()
+            if (codeRes && codeRes.data) {
+              this.shareReferralCode = codeRes.data.referralCode || codeRes.data.code || ''
+            }
+          } catch (e) {}
+        }
+        var qrRes = await getInviteQrCode()
+        if (qrRes && qrRes.data) {
+          this.inviteQrCode = qrRes.data.qrCodeBase64 || ''
+        }
+        if (!this.familyName) {
+          try {
+            var famRes = await getFamilyMembers()
+            if (famRes.code === 200 && famRes.data && famRes.data.familyName) {
+              this.familyName = famRes.data.familyName
+            }
+          } catch (e) {}
+        }
+        this.shareNickname = uni.getStorageSync('nickname') || ''
+        this.shareAvatar = uni.getStorageSync('avatar') || ''
+        this.showPoster = true
+      } catch (e) {
+        uni.showToast({ title: '生成失败', icon: 'none' })
+      } finally {
+        uni.hideLoading()
+      }
+    },
     goTeam() {
       uni.navigateTo({ url: '/pages/promotion/team' })
     },
@@ -969,6 +1017,7 @@ export default {
 .icon-commission { background: #FEF3C7; }
 .icon-withdraw { background: #DBEAFE; }
 .icon-invite { background: #D1FAE5; }
+.icon-share { background: #E0F2FE; }
 .icon-team { background: #FCE7F3; }
 .icon-leaderboard { background: #FFF3CD; }
 .icon-records { background: #EDE9FE; }

+ 1 - 1
cfc-web/.last_build_commit

@@ -1 +1 @@
-2956efc14a94ccd7140904146cf82d98a0149ebd
+1c031e958f9b21f812156ed8fcd0e4a08ba5c971

+ 2 - 2
cfc-web/package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "cfc-web",
-  "version": "1.0.692",
+  "version": "1.0.693",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "cfc-web",
-      "version": "1.0.692",
+      "version": "1.0.693",
       "dependencies": {
         "@wangeditor/editor": "^5.1.23",
         "@wangeditor/editor-for-vue": "^1.0.2",

+ 1 - 1
cfc-web/package.json

@@ -1,6 +1,6 @@
 {
   "name": "cfc-web",
-  "version": "1.0.693",
+  "version": "1.0.694",
   "private": true,
   "scripts": {
     "dev": "vue-cli-service serve",

+ 17 - 0
cfc-web/public/CHANGELOG-v1.0.md

@@ -4,6 +4,23 @@
 
 ---
 
+## v1.0.694 (2026-08-01)
+
+### 新功能
+- 商品详情加分享海报按钮+scene邀请码解析
+- 文章详情去掉分享按钮,海报传维度/简介/邀请语
+- ContentSharePoster 参数化五维配色+简介/邀请语/价格行+居中弹窗
+- SharePoster 家庭邀请卡加 familyName 文案与邀请语,字号缩小2px
+- 屏蔽在线开通会员功能,改为管理员后台设置
+
+### 其他
+- - upgrade.vue: 替换为'暂不支持在线开通'提示页
+- - ProfileMenu: 导航从index改为benefits
+- Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+
+
 ## v1.0.693 (2026-08-01)
 
 ### Bug 修复

+ 18 - 1
cfc-web/public/CHANGELOG.md

@@ -1,6 +1,6 @@
 # 更新日志
 
-> 当前版本: v1.0.693
+> 当前版本: v1.0.694
 
 ## 历史版本
 
@@ -8,6 +8,23 @@
 
 ---
 
+## v1.0.694 (2026-08-01)
+
+### 新功能
+- 商品详情加分享海报按钮+scene邀请码解析
+- 文章详情去掉分享按钮,海报传维度/简介/邀请语
+- ContentSharePoster 参数化五维配色+简介/邀请语/价格行+居中弹窗
+- SharePoster 家庭邀请卡加 familyName 文案与邀请语,字号缩小2px
+- 屏蔽在线开通会员功能,改为管理员后台设置
+
+### 其他
+- - upgrade.vue: 替换为'暂不支持在线开通'提示页
+- - ProfileMenu: 导航从index改为benefits
+- Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+
+
 ## v1.0.693 (2026-08-01)
 
 ### Bug 修复