bug修复
This commit is contained in:
@@ -116,13 +116,12 @@
|
||||
<text>设置班委</text>
|
||||
</view>
|
||||
<!-- && thisClass.showOverBtn -->
|
||||
<view class="item overClass" @click="changeClassStatu('2')"
|
||||
<!-- <view class="item overClass" @click="changeClassStatu('2')"
|
||||
v-if="classModel.isExam == 1 && thisClass.state == '3' && (roleCode.includes('1') || roleCode.includes('2'))">
|
||||
<text>结班</text>
|
||||
</view>
|
||||
|
||||
</view> -->
|
||||
<view class="item overClass" @click="changeClassStatu('2')"
|
||||
v-if="classModel.isExam == 0 && thisClass.state == '1' && thisClass.showOverBtn && (roleCode.includes('1') || roleCode.includes('2'))">
|
||||
v-if="thisClass.showOverBtn && (roleCode.includes('1') || roleCode.includes('2'))">
|
||||
<!-- (无考试) -->
|
||||
<text>结班</text>
|
||||
</view>
|
||||
@@ -1090,25 +1089,26 @@
|
||||
}
|
||||
this.classModel = res.result.classModel
|
||||
// this.thisClass.showOverBtn = false
|
||||
if (this.thisClass.state == '1') {
|
||||
// if (this.thisClass.state == '1') {
|
||||
const nowTime = Date.now()
|
||||
console.log('starting timer...毫秒', nowTime)
|
||||
var datecc = new Date(this.thisClass.startTime);
|
||||
console.log('datecc...', datecc)
|
||||
var time3 = datecc.getTime(); // 开班时间的时间戳 毫秒
|
||||
console.log('time3...毫秒', time3, this.classModel.days)
|
||||
var off70 = undefined // 时长过70%显示结班按钮天数
|
||||
off70 = Math.ceil(parseInt(this.classModel.days) * 0.7)
|
||||
var off70miniSecond = off70 * 1000 * 60 * 60 * 24
|
||||
// var off70 = undefined // 时长过70%显示结班按钮天数
|
||||
// off70 = Math.ceil(parseInt(this.classModel.days) * 0.7)
|
||||
var off70miniSecond = this.classModel.days * 1000 * 60 * 60 * 24
|
||||
console.log('时间比较', (off70miniSecond + time3), nowTime)
|
||||
if ((off70miniSecond + time3) <= nowTime) {
|
||||
console.log('显示结班按钮');
|
||||
this.thisClass.showOverBtn = true
|
||||
} else {
|
||||
console.log('不显示');
|
||||
this.thisClass.showOverBtn = false
|
||||
}
|
||||
console.log('off70...天数', off70, off70miniSecond)
|
||||
}
|
||||
// console.log('off70...天数', off70, off70miniSecond)
|
||||
// }
|
||||
|
||||
|
||||
this.thisClass.homeWorkNumber = 4
|
||||
@@ -1365,6 +1365,7 @@
|
||||
}
|
||||
|
||||
.daikaibtn {
|
||||
margin-top: 20rpx; margin-left: 20rpx;
|
||||
.item {
|
||||
padding: 10rpx 6rpx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user