|
@@ -228,7 +228,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
- console.log('dsfdsf2222222222')
|
|
|
// 1668787200 ,2022.22.19的时间戳
|
|
|
this.leftDays = 1668787200 - parseInt(curTime/1000)
|
|
|
this.getCourseLiveQues()
|
|
@@ -236,38 +235,38 @@ export default {
|
|
|
async onShow() {
|
|
|
await this.commonSystemTime()
|
|
|
this.sysTime = +this.$method.timest()
|
|
|
- console.log('this.sysTime', this.sysTime)
|
|
|
},
|
|
|
methods: {
|
|
|
bgShow(liveTime, watchStatus) {
|
|
|
- // let curTime = new Date().getTime() // 当前时间的时间戳
|
|
|
let value = liveTime * 1000
|
|
|
if (curTime > value) { // 判断当前时间和直播开始时间
|
|
|
return watchStatus == 'live' ? true : false
|
|
|
}
|
|
|
},
|
|
|
lookTimeStatus(liveTime, watchStatus) {
|
|
|
- // let curTime = new Date().getTime() // 当前时间的时间戳
|
|
|
- let value = liveTime * 1000
|
|
|
- var Y = value.getFullYear()
|
|
|
- var M = value.getMonth() + 1 < 10 ? '0' + (value.getMonth() + 1) : value.getMonth() + 1
|
|
|
- var D = value.getDate() < 10 ? '0' + value.getDate() : value.getDate()
|
|
|
- var valZ = Y + '/' + M + '/' + D
|
|
|
- let curZeroTime = new Date(valZ).getTime() // 获取开始直播时间当天的零点时间戳
|
|
|
- if (curTime > value) { // 判断当前时间和直播开始时间
|
|
|
- if (watchStatus == 'live') { //
|
|
|
- return 1
|
|
|
- } else {
|
|
|
- return 2
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (curZeroTime <= curTime && curTime <= value) { //当天
|
|
|
- return 3
|
|
|
+ if (liveTime) {
|
|
|
+ let value = new Date(liveTime * 1000)
|
|
|
+ var Y = value.getFullYear()
|
|
|
+ var M = value.getMonth() + 1 < 10 ? '0' + (value.getMonth() + 1) : value.getMonth() + 1
|
|
|
+ var D = value.getDate() < 10 ? '0' + value.getDate() : value.getDate()
|
|
|
+ var valZ = Y + '/' + M + '/' + D
|
|
|
+ let curZeroTime = new Date(valZ).getTime() // 获取开始直播时间当天的零点时间戳
|
|
|
+ if (curTime > value) { // 判断当前时间和直播开始时间
|
|
|
+ if (watchStatus == 'live') { //
|
|
|
+ return 1
|
|
|
+ } else {
|
|
|
+ return 2
|
|
|
+ }
|
|
|
} else {
|
|
|
- return 4
|
|
|
+ if (curZeroTime <= curTime && curTime <= value) { //当天
|
|
|
+ return 3
|
|
|
+ } else {
|
|
|
+ return 4
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
+
|
|
|
},
|
|
|
curTimeTamp(liveTime) {
|
|
|
let min = liveTime - parseInt(curTime / 1000)
|