Răsfoiți Sursa

feat(body): add health-dimensions navigation entry

Sisyphus 4 luni în urmă
părinte
comite
e547381699
1 a modificat fișierele cu 10 adăugiri și 1 ștergeri
  1. 10 1
      cfc-frontend/pages/body/index.vue

+ 10 - 1
cfc-frontend/pages/body/index.vue

@@ -281,7 +281,8 @@ export default {
         { icon: '\u{1F957}', label: '饮食', needLogin: true, page: '' },
         { icon: '\u{1F634}', label: '作息', needLogin: true, page: '' },
         { icon: '\u{1F9A0}', label: '菌群', needLogin: true, page: '' },
-        { icon: '\u{1F9D8}', label: '冥想', needLogin: true, page: '' }
+        { icon: '\u{1F9D8}', label: '冥想', needLogin: true, page: '' },
+        { icon: '\u{1F4CA}', label: '健康维度', needLogin: true, page: 'health-dimensions' }
       ],
       healthTips: [
         { id: 1, title: '儿童每日运动指南', summary: '不同年龄段儿童每天需要多少运动量?科学运动助力健康成长。' },
@@ -505,6 +506,14 @@ export default {
         })
         return
       }
+      if (item.page === 'health-dimensions') {
+        if (!this.activeChildId) {
+          uni.showToast({ title: '请先选择孩子', icon: 'none' })
+          return
+        }
+        uni.navigateTo({ url: '/pages/body/health-dimensions?childId=' + this.activeChildId })
+        return
+      }
       if (item.page) uni.navigateTo({ url: item.page })
     },
     goToHealthReport: function() {