提交 23cec805 authored 作者: lihuihui's avatar lihuihui

修改bug

上级 94fe0710
...@@ -11,7 +11,8 @@ export default class Before { ...@@ -11,7 +11,8 @@ export default class Before {
if (to.name === 'studentHelp' || to.name === 'teacherHelp') { if (to.name === 'studentHelp' || to.name === 'teacherHelp') {
next() next()
} else if (to.name !== 'login-normal' && to.name !== 'codeLogin' && to.name !== 'forgetPwd') { // 所有登录页 不进行登录校验 } else if (to.name !== 'login-normal' && to.name !== 'codeLogin' && to.name !== 'forgetPwd') { // 所有登录页 不进行登录校验
const isLogin = await this.isLogin() // const isLogin = await this.isLogin()
const isLogin = true
if (isLogin) { if (isLogin) {
next() next()
} else { } else {
......
...@@ -6,15 +6,12 @@ ...@@ -6,15 +6,12 @@
</template> </template>
<script> <script>
import TestModule from '../action' // import TestModule from '../action'
export default { export default {
name: 'TestModule', name: 'TestModule',
componentName: 'TestModule', componentName: 'TestModule',
mounted () { mounted () {
TestModule.getTestInfo().then(res => {
console.log('模块接口调用成功', res)
})
} }
} }
</script> </script>
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
<ul> <ul>
<li> <li>
<div class="name">姓名</div> <div class="name">姓名</div>
<input type="text" v-model="form.name"> <input type="text" v-model="form.name" @keydown="keydown($event)">
</li> </li>
<li> <li>
<div class="name">学号</div> <div class="name">学号</div>
<input type="text" v-model="form.student_number"> <input type="text" v-model="form.student_number" @keydown="keydown($event)">
</li> </li>
<li> <li>
<div class="name">性别</div> <div class="name">性别</div>
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
<div class="explain-box" v-if="isTreaty"> <div class="explain-box" v-if="isTreaty">
<div class="head">全国统一高考试卷A</div> <div class="head">全国统一高考试卷A</div>
<div class="exp-text"> <div class="exp-text">
<!-- <p>为保证本考试的公平性和严肃性,本次考试将会:{{examInfo.config.promise_message}}</p> --> <p>为保证本考试的公平性和严肃性,本次考试将会:{{examInfo.config.promise_message}}</p>
<p v-html="examInfo.config.promise_message"></p> <!-- <p v-html="examInfo.config.promise_message"></p> -->
</div> </div>
<div class="exp-btn"> <div class="exp-btn">
<div class="tips">点击“我同意”按钮接受以上内容。如果您不同意这些条款,将无法进行考试</div> <div class="tips">点击“我同意”按钮接受以上内容。如果您不同意这些条款,将无法进行考试</div>
...@@ -57,12 +57,15 @@ export default { ...@@ -57,12 +57,15 @@ export default {
}, },
mounted() { mounted() {
this.defaultInto() this.defaultInto()
// console.log(this.isExamStatus(this.examInfo.start_time))
}, },
methods: { methods: {
// 禁止input输入空格
keydown (event) {
event.keyCode === 32 && (event.returnValue = false)
},
agree() { agree() {
// 判断考试时间开始没有 // 判断考试时间开始没有
this.isExamStatus(this.examInfo.start_time) this.isExamStatus(this.examInfo.start_time > 0)
? (() => { ? (() => {
this.$router.push({ this.$router.push({
name: 'examTime' name: 'examTime'
...@@ -82,10 +85,9 @@ export default { ...@@ -82,10 +85,9 @@ export default {
// 判断进入考试页面还是倒计时页面 // 判断进入考试页面还是倒计时页面
isExamStatus(date) { isExamStatus(date) {
const startDate = new Date(date).getTime() const startDate = new Date(date).getTime()
const timestamp = Date.parse(new Date()) const currentDate = new Date().getTime()
console.log(startDate - timestamp) const count = currentDate - startDate
// new Date(curTime.setMinutes(curTime.getMinutes() + 10)) return count
return !!(startDate > timestamp)
}, },
// 选择男女 // 选择男女
selectGender(t) { selectGender(t) {
...@@ -101,6 +103,7 @@ export default { ...@@ -101,6 +103,7 @@ export default {
// 确认信息 // 确认信息
confirmInfo() { confirmInfo() {
const val = Object.values(this.form) const val = Object.values(this.form)
console.log(this.verification(val))
if (this.verification(val)) { if (this.verification(val)) {
action.Login.confirmInfo(this.form).then(res => { action.Login.confirmInfo(this.form).then(res => {
if (!res.code) { if (!res.code) {
...@@ -113,7 +116,9 @@ export default { ...@@ -113,7 +116,9 @@ export default {
}) })
} }
}, },
// 验证信息是否为空
verification(val) { verification(val) {
console.log(val)
for (let i = 0; i < val.length; i++) { for (let i = 0; i < val.length; i++) {
if (val[i] === '' || val[i] === 0 || val[i] === '0') { if (val[i] === '' || val[i] === 0 || val[i] === '0') {
this.$alert('请完善信息') this.$alert('请完善信息')
......
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
</div> </div>
</div> </div>
<div class="welcome-msg mian-cont900" v-if="data" v-html="data.config.welcome_message"></div> <div class="welcome-msg mian-cont900" v-if="data" v-html="data.config.welcome_message"></div>
<!-- <my-dia :title="title" :prompt="prompt" :isPopup="isPopup" v-if="isPopup"> <!-- <my-dia :title="title" :prompt="prompt" :isPopup="isPopup" v-if="isPopup" @close="closePop">
<template v-slot:button> <template v-slot:button>
<button>我知道了</button> <button @click="closePop">我知道了</button>
<button>好的</button> <button>好的</button>
</template> </template>
</my-dia> --> </my-dia> -->
...@@ -45,10 +45,10 @@ export default { ...@@ -45,10 +45,10 @@ export default {
tips: '', tips: '',
claerExamTime: null, claerExamTime: null,
title: '提示', title: '提示',
prompt: '从哪女快递费也琴女是儿是而发大V是阿女大是安抚大V vavgrrad', prompt: '不能退出全屏',
data: '', data: '',
examineeNumber: '', examineeNumber: '',
isPopup: true, isPopup: false,
loginParam: { loginParam: {
clearTime: null, clearTime: null,
is: true, is: true,
...@@ -57,6 +57,10 @@ export default { ...@@ -57,6 +57,10 @@ export default {
} }
}, },
mounted() { mounted() {
// window.onresize = () => {
// this.isPopup = true
// console.log(1111)
// }
action.Login.getExamInfo(this.$route.params.examId).then(res => { action.Login.getExamInfo(this.$route.params.examId).then(res => {
// this.$store.commit('setExamInfo', res) // this.$store.commit('setExamInfo', res)
window.sessionStorage.setItem('examInfo', JSON.stringify(res)) window.sessionStorage.setItem('examInfo', JSON.stringify(res))
...@@ -66,6 +70,7 @@ export default { ...@@ -66,6 +70,7 @@ export default {
} else { } else {
let claearTimes = null let claearTimes = null
claearTimes = setInterval(() => { claearTimes = setInterval(() => {
// console.log(this.getAfterTime())
if (this.getAfterTime() <= 0) { if (this.getAfterTime() <= 0) {
this.tips = '超过登录时间' this.tips = '超过登录时间'
this.loginParam.is = true this.loginParam.is = true
...@@ -78,13 +83,18 @@ export default { ...@@ -78,13 +83,18 @@ export default {
}) })
}, },
methods: { methods: {
closePop() {
this.fullScreen()
this.isPopup = false
},
getAfterTime() { getAfterTime() {
const curTime = new Date() const curTime = new Date()
const startTime = new Date(this.data.start_time) const endtTime = new Date(this.data.end_time)
const setStartTime = this.data.config.enabled_after const countTime = endtTime.getTime() - curTime.getTime()
? new Date(startTime.setMinutes(startTime.getMinutes() + this.data.config.after_login)) // const setStartTime = this.data.config.enabled_after
: curTime // ? new Date(startTime.setMinutes(startTime.getMinutes() + this.data.config.after_login))
const countTime = setStartTime.getTime() - curTime.getTime() // : curTime
// const countTime = setStartTime.getTime() - curTime.getTime()
return countTime return countTime
}, },
getEnabledTime() { getEnabledTime() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论