onLoad: function () {
var that = this;
that.audioCtx = wx.createAudioContext('myAudio');
wx.downloadFile({
url: that.data.mysite + '/data/step_stand.mp3',
success: function (res) {
that.audioCtx.setSrc(res.tempFilePath);
that.audioCtx.play();
setTimeout(function () {
wx.downloadFile({
url: that.data.mysite + '/data/step_walk.mp3',
success: function (res) {
that.audioCtx.setSrc(res.tempFilePath);
that.audioCtx.play();
setTimeout(function(){
that.startBtn();
setTimeout(that.autofinish, 10000);
},4000)
}
})
}, 6000);
}
})
that.onTimeChange();
},
|