From deaff727632eb99b0bafec8260a9c39991b9a16b Mon Sep 17 00:00:00 2001 From: cnliucheng Date: Fri, 31 Jul 2026 09:42:11 +0800 Subject: [PATCH] =?UTF-8?q?refactor(index):=20=E5=8E=BB=E6=8E=89=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E5=BA=95=E9=83=A8=20toolbar=20=E4=B8=8A=E6=96=B9?= =?UTF-8?q?=E7=9A=84=E5=B0=8F=E6=8F=90=E7=A4=BA=E5=8D=A1=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 删除首页随机姿势提示卡片(homeTip):wxml 移除 tip-card 整块、wxss 清理 .tip-card/.tip-icon/.tip-text、js 移除 homeTip 逻辑 - config.postureTips 仍被训练页复用,保留不动 --- config.js | 4 ++-- pages/index/index.js | 8 +------- pages/index/index.wxml | 8 -------- pages/index/index.wxss | 23 ----------------------- 4 files changed, 3 insertions(+), 40 deletions(-) diff --git a/config.js b/config.js index 4bf3f74..61cd2b5 100644 --- a/config.js +++ b/config.js @@ -4,7 +4,7 @@ */ module.exports = { /** 应用版本号,外显在设置页「关于」 */ - version: 'v3.02', + version: 'v3.1', /** 最后更新日期,外显在设置页「关于」 */ updatedAt: '2026-07-31', @@ -25,7 +25,7 @@ module.exports = { * 耐力榜领奖台顶部文案。哲理注脚,点出"撑得越久不一定越好"的价值观, * 与耐力榜(比谁单次撑最久)形成反差。仅耐力榜领奖台顶部显示,改这里即可。 */ - leaderboardPodiumSlogan: '平板支撑不是一场和时间的恋爱。撑得越久,不一定越好;真正重要的,是每一秒都没有辜负身体。', + leaderboardPodiumSlogan: '平板支撑不是一场和时间的恋爱,撑得越久,不一定越好。真正重要的,是每一秒都没有辜负身体。', /** * 语音合成(TTS)参数 - 直接改这里调整音色/音量/语速,无需改逻辑代码。 diff --git a/pages/index/index.js b/pages/index/index.js index fa87864..88f3418 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -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 }) }, diff --git a/pages/index/index.wxml b/pages/index/index.wxml index da1af32..368c27e 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -101,14 +101,6 @@ > - - - - - {{homeTip}} - - -