refactor(index): 去掉首页底部 toolbar 上方的小提示卡片

- 删除首页随机姿势提示卡片(homeTip):wxml 移除 tip-card 整块、wxss 清理 .tip-card/.tip-icon/.tip-text、js 移除 homeTip 逻辑
- config.postureTips 仍被训练页复用,保留不动
This commit is contained in:
2026-07-31 09:42:11 +08:00
parent 1589d6c387
commit deaff72763
4 changed files with 3 additions and 40 deletions
+1 -7
View File
@@ -15,7 +15,6 @@ Page({
todayDone: false,
todayDuration: 0,
todayTargetText: '',
homeTip: '',
// Ring number font size in rpx. WeChat auto-scales text by the user's
// font-size setting (fontSizeScaleFactor) but does NOT scale rpx box
// dimensions — so on a real device with enlarged system font the 84rpx
@@ -148,10 +147,6 @@ Page({
// 分段格子(每天一格)只在计划天数 <= 10 时用;更长则退化为里程碑连续条,避免格子过密
const useSegments = plan.totalDays > 0 && plan.totalDays <= 10
const planDays = useSegments ? Array.from({ length: plan.totalDays }, (_, i) => i) : []
// 首页姿势要领:从 config.postureTips 随机取一条,每次刷新都换,
// 让用户反复进首页能看到不同要领。配置为空时回退到默认文案,避免空白。
const tips = config.postureTips || []
const homeTip = tips.length ? tips[Math.floor(Math.random() * tips.length)] : '保持身体成一条直线,核心收紧,均匀呼吸'
this.setData({
theme,
icons: iconsMod.build(theme),
@@ -165,8 +160,7 @@ Page({
planTotal: plan.totalDays,
planProgress,
useSegments,
planDays,
homeTip
planDays
})
},