feat: 训练开始时添加语音播报
This commit is contained in:
@@ -20,6 +20,7 @@ cloud.init()
|
||||
|
||||
// Polished, fixed prompts.
|
||||
const PROMPTS = {
|
||||
start: '训练已开始',
|
||||
halfway: '已完成一半啦,坚持就是胜利!',
|
||||
last30: '最后30秒,保持呼吸,稳住姿势!',
|
||||
last10: '最后10秒,再加把劲!',
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
const PROMPTS = {
|
||||
start: '训练已开始',
|
||||
halfway: '已完成一半啦,坚持就是胜利!',
|
||||
last30: '最后30秒,保持呼吸,稳住姿势!',
|
||||
last10: '最后10秒,再加把劲!',
|
||||
|
||||
Reference in New Issue
Block a user