feat: 训练开始时添加语音播报

This commit is contained in:
2026-06-11 11:51:14 +08:00
parent 2e2594d154
commit 47f718a129
3 changed files with 4 additions and 0 deletions
+1
View File
@@ -20,6 +20,7 @@ cloud.init()
// Polished, fixed prompts.
const PROMPTS = {
start: '训练已开始',
halfway: '已完成一半啦,坚持就是胜利!',
last30: '最后30秒,保持呼吸,稳住姿势!',
last10: '最后10秒,再加把劲!',
+2
View File
@@ -165,6 +165,8 @@ Page({
if (this.data.isRunning) return
this._timer.start(this.data.duration)
this.setData({ isRunning: true, status: 'running' })
const s = storage.getSettings()
if (s.voiceGuide !== false) voice.play('start')
},
onPause() {
+1
View File
@@ -18,6 +18,7 @@
*/
const PROMPTS = {
start: '训练已开始',
halfway: '已完成一半啦,坚持就是胜利!',
last30: '最后30秒,保持呼吸,稳住姿势!',
last10: '最后10秒,再加把劲!',