bug修复

This commit is contained in:
@fawn-nine
2024-09-12 15:49:46 +08:00
parent c71b2c67b4
commit 0fa262a24a
3 changed files with 83 additions and 17 deletions

View File

@@ -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;
}