feat(timer): 训练页改版 hero 风格 + 进度环刻度 + 醒目姿态提示气泡

- progress-ring: canvas 新增秒刻度层(四分位加粗), 环内加 subText, 移除组件内 statusText
- timer.wxml: 环下方状态词 + 目标信息卡(今日目标·第N天›静态箭头) + 运行提示; 进度环传 ticks/subText
- timer.js: 派生 ringTicks/ringSubText/statusText/goalLine/runningTip/tipType/tipIcon, 各生命周期计算下发
- timer.wxss: 按钮贴底(flex-start+margin-top:auto), 新增 .timer-status/.goal-card/.timer-tip 气泡卡片(主色左边框+小三角+tipPulse 呼吸), 文字放大加粗
- 姿态提示分语义: posture/phase(主色) / done(成功色), 图标用 peopleFill/successFill
- 状态机/计时/循环FSM/呼吸环/彩带/弹窗/语音震动常亮全部保留
- 另含 index 进度地图右上角奖杯图标删除(quest-trophy 样式清理)
This commit is contained in:
2026-08-11 15:38:37 +08:00
parent 6f89494c0b
commit 0464eeaba6
8 changed files with 209 additions and 82 deletions
+101 -28
View File
@@ -2,9 +2,9 @@
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
justify-content: flex-start;
padding-top: 80rpx;
padding-bottom: calc(170rpx + env(safe-area-inset-bottom));
padding-bottom: calc(48rpx + env(safe-area-inset-bottom));
min-height: 100vh;
box-sizing: border-box;
}
@@ -281,47 +281,120 @@
100% { opacity: 0; transform: translate(0, -80rpx) scale(0.4); }
}
/* ---- hint section ---- */
.hint-section {
margin-top: 36rpx;
/* ---- 状态文案(环下方) ---- */
.timer-status {
margin-top: 40rpx;
font-size: 36rpx;
font-weight: 700;
color: var(--text);
line-height: 1.2;
text-align: center;
}
.hint-row {
display: inline-flex;
.timer-status.status--running { color: var(--primary); }
.timer-status.status--paused { color: var(--text-secondary); }
/* ---- 目标信息卡 ---- */
.goal-card {
display: flex;
align-items: center;
justify-content: center;
gap: 10rpx;
width: 620rpx;
max-width: 86%;
box-sizing: border-box;
margin-top: 28rpx;
padding: 24rpx 28rpx;
background: var(--card-bg);
border: 1rpx solid rgba(var(--primary-rgb), 0.12);
border-radius: 24rpx;
box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.05);
}
.hint-icon {
width: 36rpx;
height: 36rpx;
.goal-icon {
width: 40rpx;
height: 40rpx;
flex-shrink: 0;
margin-right: 16rpx;
}
.running-pulse {
animation: float 1.5s ease-in-out infinite;
}
.completed-bounce {
animation: bounceSoft 0.6s ease infinite;
}
.hint-text {
font-size: 34rpx;
color: var(--text-secondary);
.goal-text {
flex: 1;
min-width: 0;
font-size: 28rpx;
font-weight: 600;
color: var(--text);
line-height: 1.3;
}
.hint-text.running { color: var(--primary); font-weight: 600; }
.hint-text.paused { color: var(--primary-light); }
.hint-text.completed { color: var(--success); font-weight: 600; }
.goal-arrow {
font-size: 40rpx;
color: var(--text-secondary);
line-height: 1;
margin-left: 8rpx;
}
.completed-hint { animation: popIn 0.5s ease; }
/* ---- 运行提示(气泡卡片:姿态 / 阶段 / 目标达成) ---- */
.timer-tip {
position: relative;
display: inline-flex;
align-items: center;
gap: 14rpx;
margin-top: 18rpx;
max-width: 100%;
padding: 20rpx 32rpx;
background: #fff;
border-left: 8rpx solid var(--primary);
border-radius: 20rpx;
box-shadow: 0 8rpx 24rpx rgba(var(--primary-rgb), 0.14);
animation: tipPulse 2.4s ease-in-out infinite;
}
/* 小三角指向圆环 */
.timer-tip::before {
content: '';
position: absolute;
top: -16rpx;
left: 50%;
transform: translateX(-50%);
border-left: 16rpx solid transparent;
border-right: 16rpx solid transparent;
border-bottom: 16rpx solid #fff;
}
.timer-tip--done {
border-left-color: var(--success);
}
.timer-tip-icon {
width: 40rpx;
height: 40rpx;
flex-shrink: 0;
}
.timer-tip-text {
font-size: 30rpx;
font-weight: 600;
color: var(--text);
line-height: 1.4;
}
.timer-tip--done .timer-tip-text {
color: var(--success);
}
@keyframes tipPulse {
0%, 100% {
transform: scale(1);
box-shadow: 0 8rpx 24rpx rgba(var(--primary-rgb), 0.14);
}
50% {
transform: scale(1.03);
box-shadow: 0 12rpx 32rpx rgba(var(--primary-rgb), 0.22);
}
}
/* ---- controls ---- */
.controls {
margin-top: 60rpx;
margin-top: auto;
width: 100%;
display: flex;
justify-content: center;