merge..
This commit is contained in:
@@ -105,7 +105,7 @@ Page({
|
||||
stepsCount: 0, // 默认分几个步骤
|
||||
currentSteps: 0, // 当前默认是第几步
|
||||
currentTime: 0, // 当前总时长
|
||||
remainingTime: 0, // 播放时间
|
||||
remainingTime: '00', // 播放时间
|
||||
},
|
||||
videoContext: null,
|
||||
seeAllVideo: true,
|
||||
@@ -135,22 +135,21 @@ Page({
|
||||
let selectVideoItem = this.data.selectVideoItem
|
||||
let currentTimeEnd = selectVideoItem.steps[selectVideoItem.currentSteps].endTime
|
||||
let {
|
||||
currentTime
|
||||
currentTime,duration
|
||||
} = e.detail
|
||||
if (currentTime > currentTimeEnd && selectVideoItem.currentSteps < selectVideoItem.stepsCount) {
|
||||
selectVideoItem.currentSteps++
|
||||
|
||||
this.videoContext.pause()
|
||||
// 倒计时且有提醒
|
||||
setTimeout(() => {
|
||||
this.videoContext.play()
|
||||
}, 3000);
|
||||
}
|
||||
// 第一次初始化
|
||||
// let startCountDown = selectVideoItem.steps[selectVideoItem.currentSteps].startCountDown
|
||||
// if(!selectVideoItem.remainingTime &&selectVideoItem.currentSteps!=this.data.selectVideoItem.currentSteps){
|
||||
// let remainingTime=parseInt(currentTimeEnd - startCountDown) >=10 ? parseInt(currentTimeEnd -startCountDown):'0' + parseInt(currentTimeEnd -startCountDown)
|
||||
// selectVideoItem.remainingTime = remainingTime
|
||||
// }
|
||||
// 递减
|
||||
// if (currentTime >= startCountDown) {
|
||||
let remainingTime = parseInt(currentTimeEnd - currentTime) >= 10 ? parseInt(currentTimeEnd - currentTime) : '0' + parseInt(currentTimeEnd - currentTime)
|
||||
selectVideoItem.remainingTime = remainingTime
|
||||
// }
|
||||
|
||||
let remainingTime = parseInt(duration - currentTime) >= 10 ? parseInt(duration - currentTime) : '0' + parseInt(duration - currentTime)
|
||||
selectVideoItem.remainingTime = remainingTime
|
||||
|
||||
this.setData({
|
||||
selectVideoItem: selectVideoItem
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user