This commit is contained in:
曹辉 2023-04-27 15:19:00 +08:00
parent 88188fec04
commit e5e8f915e3
2 changed files with 20 additions and 16 deletions

View File

@ -75,19 +75,24 @@
this.baseurl = baseurl
this.trainingOrderNo = options.trainingOrderNo
this.info();
if (this.timecount > 0) {
this.Timer = setInterval(() => {
this.timecount--;
}, 1000)
}
},
methods: {
info() {
getWaitPayTrainingOrderDetails(this.trainingOrderNo).then(res => {
this.list = res.data
var ordertimes = this.list.trainingOrderTime.replaceAll(/\-/gi, "/")
var time = new Date(this.list.trainingOrderTime).getTime() / 1000 + (60 * 60 * 2)
var time = new Date(ordertimes).getTime() / 1000 + (60 * 60 * 2)
var times = new Date().getTime() / 1000
this.timestamp = time - times
this.timecount = this.timestamp
this.Timer = setInterval(() => {
this.timecount--;
}, 1000)
if (this.timestamp > 0) {
this.timecount = this.timestamp
}
this.timecount = 10
})
},
//

View File

@ -42,10 +42,8 @@
</view>
</view>
<u-popup v-model="videoshow" mode="center" closeable @close='videoshowfalse'>
<view>
<video v-if="videoshow" :src="baseurl+videoitem.itemDirectoryUrl" @timeupdate='videotimeupdate'
:initial-time='videoitem.watchTime' @error='videoerror'></video>
</view>
<video v-if="videoshow" :src="baseurl+videoitem.itemDirectoryUrl" @timeupdate='videotimeupdate'
:initial-time='videoitem.watchTime' @error='videoerror' :custom-cache="false"></video>
</u-popup>
<u-toast ref="uToast" />
</view>
@ -104,13 +102,14 @@
},
//
videoerror(e) {
this.$refs.uToast.show({
title: '暂无视频',
type: 'error',
duration: '2000'
})
this.videoerroshow = false
this.videoshow = false
console.log(e)
// this.$refs.uToast.show({
// title: '',
// type: 'error',
// duration: '2000'
// })
// this.videoerroshow = false
// this.videoshow = false
},
//novideoplay
novideoplay() {