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

View File

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