From 1224ed328ba362b469d323e71095719843bbc916 Mon Sep 17 00:00:00 2001 From: msh-agent Date: Sun, 3 May 2026 03:37:32 +0800 Subject: [PATCH] =?UTF-8?q?feat(my-profile):=20=E9=9A=90=E8=97=8F=E6=9C=AA?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E5=8A=9F=E8=83=BD=E9=A1=B9=EF=BC=8C=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E9=A3=9F=E8=B0=B1=E8=AE=A1=E7=AE=97=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除统计卡片中的「关注」(功能未实现) - 移除「我的健康」中的「健康档案」(未实现) - 整段隐藏「我的内容」(点赞/收藏/食谱均未实现) - 「工具与服务」仅保留「邀请有礼」(移除营养师/消息通知/营养指导/用药指导) - 整段隐藏「设置」(账号/隐私/帮助/关于均未实现);版本号下沉到底部独立展示 - 新增「我的健康」分组下的「食谱计算历史」入口 → /pages/tool/calculator-history - 同步清理未使用的 data 字段、icon 资源与方法 Co-Authored-By: Claude Opus 4.7 (1M context) --- msh_single_uniapp/pages/tool/my-profile.vue | 215 +++----------------- 1 file changed, 32 insertions(+), 183 deletions(-) diff --git a/msh_single_uniapp/pages/tool/my-profile.vue b/msh_single_uniapp/pages/tool/my-profile.vue index 5f980f9..a5e2354 100644 --- a/msh_single_uniapp/pages/tool/my-profile.vue +++ b/msh_single_uniapp/pages/tool/my-profile.vue @@ -23,7 +23,7 @@ - + {{ stats.checkin }} @@ -33,100 +33,33 @@ {{ stats.points }} 积分 - - {{ stats.following }} - 关注 - 我的健康 - - 🏥 - 健康档案 - 📊 饮食记录 {{ dietRecordCount }}次 - - - - - - 我的内容 - - - - 我的点赞 - {{ myLikesCount }} - - - - 我的收藏 - {{ myCollectionsCount }} - - - 📝 - 我的食谱 - {{ myRecipesCount }} + + + 🧮 + 食谱计算历史 - + 工具与服务 - - 👨‍⚕️ - 我的营养师 - 在线 - 邀请有礼 - - - 消息通知 - {{ notificationCount }} - - - 🥗 - 营养指导 - - - 💊 - 用药指导 - - - - - - - 设置 - - - - 账号设置 - - - - 隐私设置 - - - - 帮助与反馈 - - - ℹ️ - 关于我们 - v2.0 - @@ -136,6 +69,11 @@ 退出登录 + + + v2.0 + + @@ -152,14 +90,9 @@ export default { }, data() { return { + // 仅保留模板还在使用的图标资源;其它未开发入口已隐藏,对应图标无需加载 iconVerified: 'https://www.figma.com/api/mcp/asset/e06ebfe5-bf8d-40e7-9b5f-a395c823127b', - iconLike: 'https://www.figma.com/api/mcp/asset/dd7b88ff-b674-48b4-80f9-059f6205709e', - iconCollection: 'https://www.figma.com/api/mcp/asset/3e07edd4-5f53-4d38-8de9-ef920713385f', iconGift: 'https://www.figma.com/api/mcp/asset/afaeb0a1-7276-4a8c-87c0-ba4dc4ce3eba', - iconNotification: 'https://www.figma.com/api/mcp/asset/5b415d37-7e7d-4069-b714-cc8dad364bb4', - iconSettings: 'https://www.figma.com/api/mcp/asset/a6107d1c-4643-4a9c-aa57-2f90ba8c125c', - iconPrivacy: 'https://www.figma.com/api/mcp/asset/e72b9b89-6013-4c6f-b19f-95b9042f03bb', - iconHelp: 'https://www.figma.com/api/mcp/asset/1d05ae21-1147-4e48-83ac-3357447cc199', iconLogout: 'https://www.figma.com/api/mcp/asset/a4d5597f-0287-4411-a173-1e62db3c6c9f', userInfo: { name: '慢友小张', @@ -168,14 +101,9 @@ export default { }, stats: { checkin: 0, - points: 0, - following: 0 + points: 0 }, - dietRecordCount: 0, - myLikesCount: 0, - myCollectionsCount: 0, - myRecipesCount: 0, - notificationCount: 0 + dietRecordCount: 0 } }, onLoad() { @@ -206,111 +134,28 @@ export default { const streakData = streakRes.data || {}; this.stats = { checkin: streakData.totalCheckins || streakData.currentStreak || this.stats.checkin, - points: pointsData.points || pointsData.totalPoints || this.stats.points, - following: pointsData.followingCount || this.stats.following + points: pointsData.points || pointsData.totalPoints || this.stats.points }; this.dietRecordCount = streakData.totalCheckins || this.dietRecordCount; } catch (error) { console.error('加载个人统计失败:', error); } }, + // 仅保留已实现入口的方法,未开发功能项已从模板移除(避免点击只弹「开发中」toast) goToCheckin() { - uni.navigateTo({ - url: '/pages/tool/checkin' - }) + uni.navigateTo({ url: '/pages/tool/checkin' }) }, goToPoints() { - uni.navigateTo({ - url: '/pages/tool/points-rules' - }) - }, - goToFollowing() { - uni.showToast({ - title: '关注页面开发中', - icon: 'none' - }) - }, - goToHealthRecord() { - uni.showToast({ - title: '健康档案功能开发中', - icon: 'none' - }) + uni.navigateTo({ url: '/pages/tool/points-rules' }) }, goToDietRecord() { - uni.navigateTo({ - url: '/pages/tool/dietary-records' - }) + uni.navigateTo({ url: '/pages/tool/dietary-records' }) }, - goToMyLikes() { - uni.showToast({ - title: '我的点赞功能开发中', - icon: 'none' - }) - }, - goToMyCollections() { - uni.showToast({ - title: '我的收藏功能开发中', - icon: 'none' - }) - }, - goToMyRecipes() { - uni.showToast({ - title: '我的食谱功能开发中', - icon: 'none' - }) - }, - goToNutritionist() { - uni.showToast({ - title: '我的营养师功能开发中', - icon: 'none' - }) + goToCalculatorHistory() { + uni.navigateTo({ url: '/pages/tool/calculator-history' }) }, goToInvite() { - uni.navigateTo({ - url: '/pages/tool/invite-rewards' - }) - }, - goToNotifications() { - uni.showToast({ - title: '消息通知功能开发中', - icon: 'none' - }) - }, - goToNutritionGuide() { - uni.showToast({ - title: '营养指导功能开发中', - icon: 'none' - }) - }, - goToMedicationGuide() { - uni.showToast({ - title: '用药指导功能开发中', - icon: 'none' - }) - }, - goToAccountSettings() { - uni.showToast({ - title: '账号设置功能开发中', - icon: 'none' - }) - }, - goToPrivacySettings() { - uni.showToast({ - title: '隐私设置功能开发中', - icon: 'none' - }) - }, - goToHelp() { - uni.showToast({ - title: '帮助与反馈功能开发中', - icon: 'none' - }) - }, - goToAbout() { - uni.showToast({ - title: '关于我们功能开发中', - icon: 'none' - }) + uni.navigateTo({ url: '/pages/tool/invite-rewards' }) }, handleLogout() { uni.showModal({ @@ -577,12 +422,6 @@ export default { } } -.version-text { - font-size: 24rpx; - color: #9fa5c0; - flex-shrink: 0; -} - /* 退出登录按钮 */ .logout-btn { background: #ffffff; @@ -607,6 +446,16 @@ export default { } } +/* 版本号(替代原「关于我们」入口) */ +.version-tip { + text-align: center; + padding: 20rpx 0; +} +.version-tip-text { + font-size: 22rpx; + color: #9fa5c0; +} + /* 底部安全距离 */ .safe-bottom { height: 40rpx;