提交 67d5f2e6 authored 作者: lihuihui's avatar lihuihui

updata

上级 fa548700
...@@ -172,7 +172,7 @@ export default { ...@@ -172,7 +172,7 @@ export default {
clearInterval(this.clearTime) clearInterval(this.clearTime)
if (!n) { if (!n) {
this.$router.replace({ this.$router.replace({
path: '/examEnd', path: '/examEnd'
}) })
} }
window.localStorage.setItem('showflag', 'true') window.localStorage.setItem('showflag', 'true')
...@@ -213,10 +213,10 @@ export default { ...@@ -213,10 +213,10 @@ export default {
this.isExamTimeDate = false this.isExamTimeDate = false
clearInterval(this.clearTime) clearInterval(this.clearTime)
this.examTime = '00:00:00 倒计时' this.examTime = '00:00:00 倒计时'
this.endExam(1)
} else { } else {
this.countDown(countTime) this.countDown(countTime)
} }
countTime === 2 && (this.endExam(1))
}, 1000) }, 1000)
}, },
addZero(i) { addZero(i) {
...@@ -242,19 +242,6 @@ export default { ...@@ -242,19 +242,6 @@ export default {
}).catch(err => { }).catch(err => {
this.isExamEnd = true this.isExamEnd = true
console.log(err) console.log(err)
// if (err.message === '考试已结束') {
// this.$alert(err.message, {
// callback: action => {
// this.$router.replace({
// path: '/examEnd'
// })
// }
// })
// } else {
// this.$alert(err.message, {
// callback: action => {}
// })
// }
}) })
}, },
getCache() { getCache() {
......
...@@ -36,12 +36,11 @@ export default { ...@@ -36,12 +36,11 @@ export default {
this.width = '100%' this.width = '100%'
}, 1000) }, 1000)
setTimeout(() => { setTimeout(() => {
// this.ispop = false this.ispop = false
window.localStorage.removeItem('showflag') window.localStorage.removeItem('showflag')
setTimeout(() => { setTimeout(() => {
console.log(JSON.parse(window.localStorage.getItem('examInfo')).exam_id)
this.$router.replace({ this.$router.replace({
path: `/login/${this.$route.query.id}` path: `/login/${JSON.parse(window.localStorage.getItem('examInfo')).exam_id}`
}) })
}, 5000) }, 5000)
}, 4000) }, 4000)
......
...@@ -232,13 +232,13 @@ export default { ...@@ -232,13 +232,13 @@ export default {
if (this.form[this.allForm[i].key] !== '') { if (this.form[this.allForm[i].key] !== '') {
if (this.allForm[i].key === 'mobile') { if (this.allForm[i].key === 'mobile') {
if (!(/^1[3456789]\d{9}$/.test(this.form.mobile))) { if (!(/^1[3456789]\d{9}$/.test(this.form.mobile))) {
this.$alert('手机号不正确') this.$alert('手机号格式不正确')
return false return false
} }
} }
if (this.allForm[i].key === 'email') { if (this.allForm[i].key === 'email') {
if (!(/^([a-zA-Z\d])(\w)+@[a-zA-Z\d]+\.[a-zA-Z]{2,4}$/.test(this.form.email))) { if (!(/^([a-zA-Z\d])(\w)+@[a-zA-Z\d]+\.[a-zA-Z]{2,4}$/.test(this.form.email))) {
this.$alert('邮箱不正确') this.$alert('邮箱格式不正确')
return false return false
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论