Commit ebb85b27 authored by lvtz's avatar lvtz

fix

parent 7a617427
......@@ -189,14 +189,14 @@ Page({
},
bindtouchstart (e) {
if(this.data.step!=2 || !this.data.ispainting){
return
}
if(this.data.medalModal){
this.setData({
medalModal: false
})
}
if(this.data.step!=2 || !this.data.ispainting){
return
}
const {x, y} = e.touches[0];
this.data.lastLoc = {x, y};
this.data.lastTimestamp = new Date().getTime();
......
......@@ -123,16 +123,34 @@ Page({
onReady: function () { // Do something when page ready.
},
onHide: function () { // Do something when page hide.
let audioStorage = this.data.audioStorage;
audioStorage.play = false;
this.setData({
audioStorage,
})
clearTimeout(this.playTimeOut);
if (this.data.type == 2) {
this.videoContext.pause();
}
this.innerAudioContext.pause();
clearInterval(this.data.voiceInterval);
this.data.voiceInterval = null;
this.pausevoice();
clearInterval(this.secondinterval);
},
onUnload: function () {
let audioStorage = this.data.audioStorage;
audioStorage.play = false;
this.setData({
audioStorage,
})
clearTimeout(this.playTimeOut);
if (this.data.type == 2) {
this.videoContext.pause();
}
this.innerAudioContext.pause();
clearInterval(this.data.voiceInterval);
this.data.voiceInterval = null;
this.pausevoice();
clearInterval(this.secondinterval);
},
loadImgOnImage(self){
let that = this;
......@@ -253,14 +271,6 @@ Page({
})
}).exec();
},
onUnload: function () { // Do something when page close.
this.innerAudioContext.pause();
clearInterval(this.data.voiceInterval);
},
onPullDownRefresh: function () { // Do something when pull down.
},
onReachBottom: function () { // Do something when page reach bottom.
},
resetAudiosPlayStatus() {
let audioStorage = this.data.audioStorage;
audioStorage.play = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment