添加证书

This commit is contained in:
@fawn-nine
2024-09-14 16:06:35 +08:00
parent d3097edd2c
commit 5ee3ec4398
15 changed files with 407 additions and 133 deletions

View File

@@ -149,6 +149,7 @@
questionList:[],
answerIdsList:[],
wantSubmit:false, // 想要提交
}
},
async onLoad(e) {
@@ -162,9 +163,7 @@
onHide() {
if (!this.isOvertime) {}
},
onShow() {
// this.endTime = this.hourUp(1)
// console.log('this.endTime', this.endTime.getTime());
async onShow() {
},
beforeDestroy() {
@@ -484,43 +483,21 @@
this.noAnswerList = this.getNoAnswerList()
this.haveAnswerList = this.gethaveAnswerList()
// console.log('this.answerIdsList', this.answerIdsList);
this.testPaper = res.examPaper
var planEndTimeDate = new Date(res.planEndTime)
this.endTime = planEndTimeDate.getTime(); // 结束的时间戳
console.log('this.endTime',this.endTime);
this.testPaper = res.examPaper
// var planEndTimeDate = new Date(res.planEndTime)
// this.endTime = planEndTimeDate.getTime();
this.endTime = res.planEndTime
var severNowTime = await this.getServerTime()
this.severNowTime = severNowTime
console.log('this.endTime',this.endTime);
this.secondTimeDif = this.endTime - severNowTime // 时间差 毫秒
if(this.secondTimeDif > 0){
// this.setPaperEndTime({time:this.endTime})
uni.setStorage({
key:'paperEndTime',
data:{
time: this.endTime,
examId: this.examId,
},
success: function () {
console.log('时间存储成功');
}
})
// this.setPaperEndTime({time:this.endTime})
this.timeDif.hour = parseInt((this.secondTimeDif % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))
this.timeDif.minutes = parseInt((this.secondTimeDif % (1000 * 60 * 60)) / (1000 * 60))
this.timeDif.second = (this.secondTimeDif % (1000 * 60)) / 1000
console.log('this.endTime',this.timeDif.hour, this.timeDif.minutes, this.timeDif.second);
}else{
uni.setStorage({
key:'paperEndTime',
data:{
time: 0,
examId: undefined,
},
success: function () {
console.log('时间存储成功');
}
})
}
// console.log('本地存储的结束时间', this.$store.state.paperEndTime);
console.log('this.endTime',this.timeDif.hour, this.timeDif.minutes, this.timeDif.second);
}
this.curQuestion = {
...this.questionList[this.curIndex1]
}