Commit fe863da3 authored by Damon's avatar Damon

refactor: 【ID1001496】【前台】模拟考时,点击右上角关闭小程序后,倒计时需要锁定。

parent 801f198c
...@@ -225,15 +225,15 @@ export default { ...@@ -225,15 +225,15 @@ export default {
}, },
onShow() { onShow() {
// 从后台进入重新计算倒计时 // 从后台进入重新计算倒计时
if (this.source === 3 && this.beginTime) { // if (this.source === 3 && this.beginTime) {
const timestamp = Utils.diffTime(this.beginTime, new Date()) // const timestamp = Utils.diffTime(this.beginTime, new Date())
this.timestamp = this.currentTime - timestamp // this.timestamp = this.currentTime - timestamp
this.$u.vuex('beginTime', '') // this.$u.vuex('beginTime', '')
} // }
}, },
onHide() { onHide() {
// 记录进入后台时间 // 记录进入后台时间
if (this.source === 3) this.$u.vuex('beginTime', new Date()) // if (this.source === 3) this.$u.vuex('beginTime', new Date())
}, },
onLoad(e) { onLoad(e) {
if (e?.experience) this.experience = JSON.parse(e.experience) // 体验资格 if (e?.experience) this.experience = JSON.parse(e.experience) // 体验资格
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment