Przeglądaj źródła

chore: auto bump version and changelog [skip ci]

iwt 1 miesiąc temu
rodzic
commit
595f8edcd4

+ 2 - 2
cfc-frontend/pages.json

@@ -460,9 +460,9 @@
           }
         },
         {
-          "path": "emotion-checkin",
+          "path": "growth-emotion-checkin",
           "style": {
-            "navigationBarTitleText": "心情打卡"
+            "navigationBarTitleText": "心情打卡 (成长)"
           }
         }
       ]

+ 3 - 21
cfc-frontend/pages/growth-main/index.vue

@@ -279,7 +279,7 @@ export default {
     dismissReminder: function() { this.hasIncomplete = false },
     handleProgressClick: function(item) {
       if (!item || !item.key) return
-      var m = { diet: '/pages/growth/diet-checkin', exercise: '/pages/growth/exercise-checkin', sleep: '/pages/growth/sleep-checkin', emotion: '/pages/growth/emotion-checkin' }
+      var m = { diet: '/pages/growth/diet-checkin', exercise: '/pages/growth/exercise-checkin', sleep: '/pages/growth/sleep-checkin', emotion: '/pages/growth/growth-emotion-checkin' }
       var url = m[item.key]
       if (url) uni.navigateTo({ url: url })
     },
@@ -294,7 +294,7 @@ export default {
     goMoreProducts: function() { uni.navigateTo({ url: '/pages/shop/index/index' }) },
     goMoreArticles: function() { uni.navigateTo({ url: '/pages/article-center/index?dimension=action' }) },
     goPage: function(url) { uni.navigateTo({ url: url }) },
-    loadTrackingData: function(key) { return this.trackingData[key] || [] },
+    loadTrackingData: function(key) { return [] },
     formatDateKey: function(dateVal) {
       if (!dateVal) return ''
       var d = parseDate(dateVal)
@@ -321,21 +321,16 @@ export default {
     async loadProgressItems() {
       var self = this
       var items = []
-      // 饮食记录:health/meal/list 返回当日记录数组
+       // 饮食记录:health/meal/list 返回当日记录数组
       var dietDone = false
       try {
         var dParams = self.memberId ? { memberId: self.memberId } : {}
         var dRes = await getHealthMealList(dParams)
         var dList = (dRes.code === 200 && dRes.data) ? dRes.data : []
-        self.trackingData.diet = []
         for (var di = 0; di < dList.length; di++) {
           var dr = dList[di]
           if (!dr) continue
           if (self.formatDateKey(dr.createdAt || dr.recordDate) === self.todayDate) dietDone = true
-          if (di < 5) {
-            var foods = dr.foodNames || dr.mealContent || dr.notes || ''
-            self.trackingData.diet.push({ _id: dr.id, _date: self.mealTypeLabel(dr.mealType), _content: foods || '已记录' })
-          }
         }
       } catch(e) {}
       items.push({ key: 'diet', icon: '🍽️', label: '饮食记录', done: dietDone, actionText: '补录' })
@@ -345,15 +340,10 @@ export default {
         var eParams = self.memberId ? { memberId: self.memberId } : {}
         var eRes = await getExerciseRecords(eParams)
         var eList = (eRes.code === 200 && eRes.data) ? eRes.data : []
-        self.trackingData.exercise = []
         for (var ei = 0; ei < eList.length; ei++) {
           var er = eList[ei]
           if (!er) continue
           if (self.formatDateKey(er.startTime || er.createdAt) === self.todayDate) exerciseDone = true
-          if (ei < 5) {
-            var eText = (er.exerciseType || '运动') + (er.durationMinutes ? ' ' + er.durationMinutes + '分钟' : '') + (er.caloriesBurned ? ' · ' + er.caloriesBurned + '千卡' : '')
-            self.trackingData.exercise.push({ _id: er.id, _date: self.formatRecordDate(er.startTime || er.createdAt), _content: eText })
-          }
         }
       } catch(e) {}
       items.push({ key: 'exercise', icon: '🏃', label: '运动记录', done: exerciseDone, actionText: '记录' })
@@ -363,15 +353,10 @@ export default {
         var sParams = self.memberId ? { memberId: self.memberId } : {}
         var sRes = await getSleepRecords(sParams)
         var sList = (sRes.code === 200 && sRes.data) ? sRes.data : []
-        self.trackingData.sleep = []
         for (var si = 0; si < sList.length; si++) {
           var sr = sList[si]
           if (!sr) continue
           if (self.formatDateKey(sr.sleepTime || sr.createdAt) === self.todayDate) sleepDone = true
-          if (si < 5) {
-            var sText = (sr.durationMinutes ? sr.durationMinutes + '分钟' : '') + (sr.qualityScore ? ' · 质量' + sr.qualityScore + '分' : '')
-            self.trackingData.sleep.push({ _id: sr.id, _date: self.formatRecordDate(sr.sleepTime || sr.createdAt), _content: sText || '已记录' })
-          }
         }
       } catch(e) {}
       items.push({ key: 'sleep', icon: '😴', label: '睡眠记录', done: sleepDone, actionText: '记录' })
@@ -382,13 +367,10 @@ export default {
         if (self.memberId) mParams.memberId = self.memberId
         var mRes = await getEmotionCheckinList(mParams)
         var mList = (mRes.code === 200 && mRes.data) ? mRes.data : []
-        self.trackingData.emotion = []
         for (var mi = 0; mi < mList.length; mi++) {
           var mr = mList[mi]
           if (!mr) continue
           if (self.formatDateKey(mr.checkinDate || mr.createdAt) === self.todayDate) emotionDone = true
-          var mText = (mr.moodWeather || '') + (mr.moodScore ? ' · ' + mr.moodScore + '分' : '')
-          self.trackingData.emotion.push({ _id: mr.id, _date: self.formatRecordDate(mr.checkinDate || mr.createdAt), _content: mText || (mr.note || '已记录') })
         }
       } catch(e) {}
       items.push({ key: 'emotion', icon: '😊', label: '心情记录', done: emotionDone, actionText: '记录' })

+ 0 - 0
cfc-frontend/pages/growth/emotion-checkin.vue → cfc-frontend/pages/growth/growth-emotion-checkin.vue


+ 1 - 1
cfc-web/.last_build_commit

@@ -1 +1 @@
-e169afc0a0c9103d9c4afadcda00bc1945d724b6
+8eab210678d8fbfd9c0c0c285efd73d92c215c82

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

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

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

@@ -4,6 +4,26 @@
 
 ---
 
+## v1.0.1097 (2026-08-16)
+
+### 新功能
+- 专项调研页适配 v2 契约 - 按 code 拉取问卷 + 提交选项 id (survey-rework)
+- 专项调研重设计 v2 - 统一问卷契约 + 内置默认问卷 (survey-rework)
+
+### 其他
+- - flow-intro.vue:surveyTemplateId 取值修正(后端返回平铺字段,兼容嵌套 surveyTemplate.id)
+- - api.js:新增 getProblemSurveyQuestions(code)
+- Ultraworked with [Sisyphus](https://github.com/OhMyOpenCode)
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+- - submit 改读 surveyTemplateId(兼容旧 templateId),answers 统一 [{questionId, optionIds}](兼容旧 Map/[{questionText, optionTexts}])
+- - ProblemDomainController.list 补平铺 surveyTemplateId 字段(修复 flow-intro 透传断链)
+- - 迁移248:survey_templates 内置 3 个问题域问卷种子(空表才插入)+ problem_domains 未绑定才绑定,幂等
+- Ultraworked with [Sisyphus](https://github.com/OhMyOpenCode)
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+
+
 ## v1.0.1096 (2026-08-16)
 
 ### Bug 修复

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

@@ -1,6 +1,6 @@
 # 更新日志
 
-> 当前版本: v1.0.1096
+> 当前版本: v1.0.1097
 
 ## 历史版本
 
@@ -8,6 +8,26 @@
 
 ---
 
+## v1.0.1097 (2026-08-16)
+
+### 新功能
+- 专项调研页适配 v2 契约 - 按 code 拉取问卷 + 提交选项 id (survey-rework)
+- 专项调研重设计 v2 - 统一问卷契约 + 内置默认问卷 (survey-rework)
+
+### 其他
+- - flow-intro.vue:surveyTemplateId 取值修正(后端返回平铺字段,兼容嵌套 surveyTemplate.id)
+- - api.js:新增 getProblemSurveyQuestions(code)
+- Ultraworked with [Sisyphus](https://github.com/OhMyOpenCode)
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+- - submit 改读 surveyTemplateId(兼容旧 templateId),answers 统一 [{questionId, optionIds}](兼容旧 Map/[{questionText, optionTexts}])
+- - ProblemDomainController.list 补平铺 surveyTemplateId 字段(修复 flow-intro 透传断链)
+- - 迁移248:survey_templates 内置 3 个问题域问卷种子(空表才插入)+ problem_domains 未绑定才绑定,幂等
+- Ultraworked with [Sisyphus](https://github.com/OhMyOpenCode)
+- Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
+- 
+
+
 ## v1.0.1096 (2026-08-16)
 
 ### Bug 修复