|
@@ -112,7 +112,7 @@ Page({
|
|
|
"title": this.data.title,
|
|
|
"lessonId": this.data.classId,
|
|
|
"productId": this.data.productId,
|
|
|
- "playStopTime": this.videoPlayTime,
|
|
|
+ "playStopTime": Math.ceil(this.videoPlayTime),
|
|
|
"userReadId": this.data.userReadId,
|
|
|
"type": 'READ',
|
|
|
}
|
|
@@ -224,8 +224,8 @@ Page({
|
|
|
this.setData({
|
|
|
isLike: true,
|
|
|
flowerNum: res.data.count
|
|
|
- },()=>{
|
|
|
- if(res.data.count > 0){
|
|
|
+ }, () => {
|
|
|
+ if (res.data.count > 0) {
|
|
|
this.flowerAnimationHandler();
|
|
|
}
|
|
|
});
|
|
@@ -290,8 +290,6 @@ Page({
|
|
|
this.innerAudioContext.pause();
|
|
|
},
|
|
|
videoProgress: function (e) {
|
|
|
- console.log('视频加载进度变化')
|
|
|
- console.log(e)
|
|
|
if (e.detail.buffered <= 10) {
|
|
|
this.innerAudioContext.pause();
|
|
|
} else {
|
|
@@ -299,10 +297,7 @@ Page({
|
|
|
}
|
|
|
},
|
|
|
videoTimeupdate: function (e) {
|
|
|
- console.log('视频播放进度发生变化')
|
|
|
- console.log('视频当前时长', e.detail.currentTime);
|
|
|
this.videoPlayTime = e.detail.currentTime
|
|
|
- console.log('音频当前时长', this.innerAudioContext.currentTime)
|
|
|
if (e.detail.currentTime - this.innerAudioContext.currentTime >= 1) {
|
|
|
this.innerAudioContext.seek(e.detail.currentTime - 0.1);
|
|
|
}
|
|
@@ -509,7 +504,7 @@ Page({
|
|
|
|
|
|
}
|
|
|
},
|
|
|
- flowerAnimationHandler: function(){
|
|
|
+ flowerAnimationHandler: function () {
|
|
|
this.flowerBox = this.selectComponent("#flower-box");
|
|
|
this.flowerBox.comeOut();
|
|
|
},
|
|
@@ -691,8 +686,21 @@ Page({
|
|
|
this.onLoad(this.data.onLoadOption);
|
|
|
},
|
|
|
goToClass: function () {
|
|
|
- wx.navigateTo({
|
|
|
- url: `../../main/class/class?id=${this.data.classId}`
|
|
|
- })
|
|
|
+
|
|
|
+ if (!this.data.isIOS && this.videoCtx ) {
|
|
|
+ this.innerAudioContext.stop();
|
|
|
+ this.innerAudioContext.destroy();
|
|
|
+ this.videoCtx.stop();
|
|
|
+ this.setData({
|
|
|
+ videoLoad: false
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ wx.navigateTo({
|
|
|
+ url: `../../main/class/class?id=${this.data.classId}`
|
|
|
+ })
|
|
|
+ }, 100)
|
|
|
+
|
|
|
}
|
|
|
})
|