feat(timer): 训练时长低于阈值不记录并明确提示
- config.js 新增 minRecordSeconds: 20 阈值配置,改配置即可调整门槛 - timer.js: finishTraining/_onCircuitComplete 低时长不播完成语音; _saveAndShowCompletion 兜底判断,任何入口都不会把短时训练落库; 新增 _showNotRecorded: 不保存记录、不更新连胜,复用完成弹窗展示实际秒数 - timer.wxml/wxss: 完成弹窗新增"未计入记录"提示行(门槛说明), 未记录时隐藏"查看记录/分享"按钮,只留"再来一次+回到首页" - 修复状态残留: 未记录后点"再来一次",下次正常完成不会误显示"未计入记录"
This commit is contained in:
@@ -425,6 +425,46 @@
|
||||
height: 32rpx;
|
||||
}
|
||||
|
||||
/* 未达最低记录时长提示(完成弹窗内):主色淡底信息块,与科学提示同风格 */
|
||||
.completion-not-recorded {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10rpx;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
background: rgba(var(--primary-rgb), 0.08);
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
margin-bottom: 28rpx;
|
||||
animation: tipIn 0.4s ease 0.5s both;
|
||||
}
|
||||
|
||||
.completion-not-recorded-main {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10rpx;
|
||||
}
|
||||
|
||||
.completion-not-recorded-icon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.completion-not-recorded-title {
|
||||
flex: 1;
|
||||
font-size: 26rpx;
|
||||
font-weight: 600;
|
||||
line-height: 1.4;
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.completion-not-recorded-sub {
|
||||
font-size: 24rpx;
|
||||
line-height: 1.5;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.streak-text {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user