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

修改bug

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