This commit is contained in:
shijingjing
2023-03-30 14:57:40 +08:00
parent 5481602d07
commit 06d6255d97

View File

@@ -151,15 +151,18 @@ export default {
},
baoming() {
const times = new Date().getTime()
const inETimes = new Date(this.info.intoEndtime?.replaceAll('-', '/')).getTime() // 进场结束
// 0不符合条件 1已报名 2可以报名
const inSTimes = new Date(this.info.intoBegintime).getTime() // 报名开始
const inETimes = new Date(this.info.intoEndtime).getTime() // 报名结束
console.log(inSTimes, inETimes, times);
// 1已报名
if (this.info.enrollClock) {
return 1
}
if (!this.info.enrollClock && times < inETimes) {
// 2可以报名
if (!this.info.enrollClock && times < inETimes && times > inSTimes) {
return 2
}
// 0不符合条件
return 0
}
},