This commit is contained in:
曹辉 2023-04-28 09:11:42 +08:00
parent b1967a2574
commit 8dee015d95
2 changed files with 12 additions and 8 deletions

View File

@ -122,10 +122,9 @@
},
//
videoplays() {
console.log(this.videoitem.watchTime)
// if (this.videoitem.watchTime) {
this.videoContext.seek(this.videoitem.watchTime)
// }
if (this.videoitem.watchTime) {
this.videoContext.seek(this.videoitem.watchTime)
}
},
videoplay(item) {
this.videoerroshow = true
@ -153,7 +152,6 @@
}
this.videoshow = true
this.videoContext = uni.createVideoContext('video', this)
console.log(this.videoContext)
} else {
this.$refs.uToast.show({
title: '暂无视频',

View File

@ -111,7 +111,6 @@
//
videoplays() {
if (this.videoitem.watchTime) {
this.videoContext = uni.createVideoContext('video')
this.videoContext.seek(this.videoitem.watchTime)
}
},
@ -140,6 +139,7 @@
})
}
this.videoshow = true
this.videoContext = uni.createVideoContext('video', this)
} else {
this.$refs.uToast.show({
title: '暂无视频',
@ -168,13 +168,19 @@
//
formatsecond(value) {
value = value.split(':')
var number = 0
value.forEach(e => {
e = Number(e)
})
value[0] = value[0] * 24 * 60
value[1] = value[1] * 60
value = value[0] + value[1] + value[2]
return value
value.forEach(e => {
e = Number(e)
if (e > 0) {
number = number + e
}
})
return number
},
//
formatSeconds(value) {