Bläddra i källkod

chore: auto bump version and changelog [skip ci]

iwt 1 vecka sedan
förälder
incheckning
ec56674a8c

+ 1 - 1
cfc-frontend/components/ProfileMenu.vue

@@ -251,7 +251,7 @@ var res = await getReferralCode()
       const config = inviteTypes[type] || inviteTypes.family
       var path = config.path
       if (this.referralCode) {
-        path = path + '&inviteCode=' + this.referralCode
+        path = path + '&refCode=' + this.referralCode
       }
       this.$emit('invite-generate', {
         title: config.title,

+ 3 - 3
cfc-frontend/pages/activity/activity-detail/activity-detail.vue

@@ -314,9 +314,9 @@ export default {
     }
   },
   onLoad: function(options) {
-    // 兼容旧分享链接:inviteCode 参数(shareMixin onLoad 也会处理,此处显式兜底)
-    if (options && options.inviteCode) {
-      this.autoBindInviteCode(options.inviteCode)
+    // 兼容旧分享链接:refCode / inviteCode 参数(shareMixin onLoad 也会处理,此处显式兜底)
+    if (options && (options.refCode || options.inviteCode)) {
+      this.autoBindInviteCode(options.refCode || options.inviteCode)
     }
     var aid = ''
     if (options && options.id) {

+ 3 - 3
cfc-frontend/pages/article-center/article-detail.vue

@@ -108,9 +108,9 @@ export default {
   onLoad(options) {
     this.mascotIcon = this.mascotList[Math.floor(Math.random() * 2)].icon
     this.mascotName = this.mascotList[Math.floor(Math.random() * 2)].name
-    // 兼容旧分享链接:inviteCode 参数(shareMixin onLoad 也会处理,此处显式兜底)
-    if (options && options.inviteCode) {
-      this.autoBindInviteCode(options.inviteCode)
+    // 兼容旧分享链接:refCode / inviteCode 参数(shareMixin onLoad 也会处理,此处显式兜底)
+    if (options && (options.refCode || options.inviteCode)) {
+      this.autoBindInviteCode(options.refCode || options.inviteCode)
     }
     var aid = ''
     if (options && options.id) {

+ 3 - 3
cfc-frontend/pages/discover-detail/product-detail/product-detail.vue

@@ -303,9 +303,9 @@ export default {
     }
   },
   onLoad(options) {
-    // 兼容旧分享链接:inviteCode 参数(shareMixin onLoad 也会处理,此处显式兜底)
-    if (options && options.inviteCode) {
-      this.autoBindInviteCode(options.inviteCode)
+    // 兼容旧分享链接:refCode / inviteCode 参数(shareMixin onLoad 也会处理,此处显式兜底)
+    if (options && (options.refCode || options.inviteCode)) {
+      this.autoBindInviteCode(options.refCode || options.inviteCode)
     }
     var pid = options && options.id ? options.id : ''
     if (options && options.scene) {

+ 12 - 5
cfc-frontend/pages/index-home/index.vue

@@ -669,9 +669,16 @@ membershipDays: 0,
   onLoad(options) {
     this._onLoadFired = true
     // 兜底:分享卡直达首页(热启动直通等 App 级捕获未覆盖到的路径)时,
-    // 新用户把 inviteCode 写入 storage,登录注册后由 login / user-edit 消费绑定推荐人
-    if (options && options.inviteCode && !uni.getStorageSync('token')) {
-      uni.setStorageSync('inviteCode', options.inviteCode)
+    // 新用户把推荐码写入 storage,登录注册后由 login / user-edit 消费绑定推荐人
+    // 注意:type=parent_invite 的家庭邀请码不存推荐码 storage,避免后续误绑
+    if (options && !uni.getStorageSync('token')) {
+      var refCode = options.refCode
+      if (!refCode && options.inviteCode && options.type !== 'parent_invite') {
+        refCode = options.inviteCode  // 兼容老推荐码链接
+      }
+      if (refCode) {
+        uni.setStorageSync('refCode', refCode)
+      }
     }
     this._doInit(options)
   },
@@ -1386,7 +1393,7 @@ membershipDays: 0,
     onShareAppMessage: function() {
       var path = '/pages/index-home/index'
       if (this.referralCode) {
-        path = path + '?inviteCode=' + this.referralCode
+        path = path + '?refCode=' + this.referralCode
       }
       return {
         title: '浠艾福 · 家庭五维幸福成长',
@@ -1398,7 +1405,7 @@ membershipDays: 0,
     onShareTimeline: function() {
       var query = ''
       if (this.referralCode) {
-        query = 'inviteCode=' + this.referralCode
+        query = 'refCode=' + this.referralCode
       }
       return {
         title: '浠艾福 · 家庭五维幸福成长',

+ 4 - 4
cfc-frontend/pages/profile/index.vue

@@ -58,9 +58,9 @@ export default {
     onShareAppMessage() {
     if (this.shareData) {
       var path = this.shareData.path
-      if (this.referralCode && path.indexOf('inviteCode=') === -1) {
+      if (this.referralCode && path.indexOf('refCode=') === -1 && path.indexOf('inviteCode=') === -1) {
         var sep = path.indexOf('?') === -1 ? '?' : '&'
-        path = path + sep + 'inviteCode=' + this.referralCode
+        path = path + sep + 'refCode=' + this.referralCode
       }
       return {
         title: this.shareData.title,
@@ -75,8 +75,8 @@ export default {
       var qi = this.shareData.path.indexOf('?')
       if (qi !== -1) query = this.shareData.path.substring(qi + 1)
     }
-    if (this.referralCode && query.indexOf('inviteCode=') === -1) {
-      query = query + (query ? '&' : '') + 'inviteCode=' + this.referralCode
+    if (this.referralCode && query.indexOf('refCode=') === -1 && query.indexOf('inviteCode=') === -1) {
+      query = query + (query ? '&' : '') + 'refCode=' + this.referralCode
     }
     return {
       title: this.shareData ? this.shareData.title : '浠艾福 — 给全家的一站式幸福提案',

+ 2 - 2
cfc-frontend/pages/profile/report-detail.vue

@@ -53,7 +53,7 @@ export default {
   onShareAppMessage() {
     var path = '/pages/profile/report-detail?id=' + this.reportId
     if (this.referralCode) {
-      path = path + '&inviteCode=' + this.referralCode
+      path = path + '&refCode=' + this.referralCode
     }
     return {
       title: this.detail.title || '浠艾福报告',
@@ -63,7 +63,7 @@ export default {
   onShareTimeline() {
     var query = 'id=' + this.reportId
     if (this.referralCode) {
-      query = query + '&inviteCode=' + this.referralCode
+      query = query + '&refCode=' + this.referralCode
     }
     return {
       title: this.detail.title || '浠艾福报告',

+ 9 - 6
cfc-frontend/pages/user-edit/user-edit.vue

@@ -935,26 +935,29 @@ export default {
 					console.error('保存 mascot 失败', e)
 				}
 			}
-			// 新用户流程:消费分享者推荐码,绑定推荐人(非 team 类型
+			// 新用户流程:消费分享者推荐码,绑定推荐人(推荐码统一为 refCode storage
 			// 登录页 completeLogin 在 needsRoleSelect=true 时直接跳本页,跳过了 handleReferralBind,
-			// 因此在此处统一消费 storage 中的 inviteCode,避免推荐人绑定丢失
+			// 因此在此处统一消费 storage 中的 refCode/inviteCode,避免推荐人绑定丢失
+			var refCode = uni.getStorageSync('refCode')
 			var inviteCode = uni.getStorageSync('inviteCode')
 			var inviteType = uni.getStorageSync('inviteType')
-			if (inviteCode && inviteType !== 'team') {
+			var code = refCode || (inviteCode && inviteType !== 'team' ? inviteCode : '')
+			if (code) {
 				var self = this
-				bindReferral(inviteCode).then(function(res) {
+				bindReferral(code).then(function(res) {
 					if (res && res.code === 200) {
-						console.log('新用户绑定推荐人成功', inviteCode)
+						console.log('新用户绑定推荐人成功', code)
 					}
 				}).catch(function(e) {
 					// 后端 Result.error(code=500) → request() 已 toast 业务消息
 					if (e && e.code !== undefined && e.code !== 401) {
-						console.log('新用户绑定推荐人业务拒绝', inviteCode, e.message || '')
+						console.log('新用户绑定推荐人业务拒绝', code, e.message || '')
 					} else {
 						console.log('新用户绑定推荐人失败', e)
 					}
 				})
 			}
+			uni.removeStorageSync('refCode')
 			uni.removeStorageSync('inviteCode')
 			uni.removeStorageSync('inviteType')
 			// 用 switchTab 跳转带底部 TabBar 的首页(行/身/智/心/富)

+ 1 - 1
cfc-web/.last_build_commit

@@ -1 +1 @@
-b6f3ad4c92e3ee2bd57fcfb7f9164620624fd59d
+1dbb9130e9a336a77660c7ada942c1c1480fff7b

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

@@ -1,12 +1,12 @@
 {
   "name": "cfc-web",
-  "version": "1.0.1330",
+  "version": "1.0.1331",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "cfc-web",
-      "version": "1.0.1330",
+      "version": "1.0.1331",
       "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.1331",
+  "version": "1.0.1332",
   "private": true,
   "scripts": {
     "dev": "vue-cli-service serve",

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

@@ -4,6 +4,19 @@
 
 ---
 
+## v1.0.1332 (2026-09-08)
+
+### 新功能
+- 成长页跳转带 memberId + 食材页分类/排序/溢出修复
+- 健康报告食材推荐接口支持 memberId 查询孩子视角
+
+### 其他
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+
+
 ## v1.0.1331 (2026-09-08)
 
 ### 文档

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

@@ -1,6 +1,6 @@
 # 更新日志
 
-> 当前版本: v1.0.1331
+> 当前版本: v1.0.1332
 
 ## 历史版本
 
@@ -8,6 +8,19 @@
 
 ---
 
+## v1.0.1332 (2026-09-08)
+
+### 新功能
+- 成长页跳转带 memberId + 食材页分类/排序/溢出修复
+- 健康报告食材推荐接口支持 memberId 查询孩子视角
+
+### 其他
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+
+
 ## v1.0.1331 (2026-09-08)
 
 ### 文档