diff --git a/src/pages/account/login/index.vue b/src/pages/account/login/index.vue index 692fbe9..b57e61f 100644 --- a/src/pages/account/login/index.vue +++ b/src/pages/account/login/index.vue @@ -34,8 +34,8 @@ export default { return { isReg: false, loginForm: { - username: '13563422432', - password: '111aaa', + username: '', + password: '', }, loginRules: { username: [{ required: true, message: '请输入用户名', trigger: 'blur' }], diff --git a/src/pages/exam/do/index.vue b/src/pages/exam/do/index.vue index abe712d..a96f997 100644 --- a/src/pages/exam/do/index.vue +++ b/src/pages/exam/do/index.vue @@ -169,15 +169,15 @@ export default { }, mounted() { this.getData() - this.addLeaveEvent() - this.queryState() + this.addLeaveEvent()// 页面离开的时候询问是否离开 + this.queryState()// 每秒钟调接口查询考试是否被强制交卷 }, beforeDestroy(){ clearInterval(this.timer) clearInterval(this.queryStateTimer) window.onbeforeunload = null window.updateProgress = null - this.addRecords() + this.addRecords()// 页面离开前提交学生所做答案 }, methods: { getData() { @@ -351,8 +351,10 @@ export default { e.map((n,k) => { let userAnswer = '' if(i == 1){ + // 多选题 userAnswer = n.val.join('') }else if(i == 3){ + // 填空题收集每个空的答案 userAnswer = [...document.querySelectorAll(`.stem${i}${k} input`)].map(n => n.value).filter(n => n).join('<>') }else{ userAnswer = n.val diff --git a/src/pages/practice/do/index.vue b/src/pages/practice/do/index.vue index 5321837..dda5d03 100644 --- a/src/pages/practice/do/index.vue +++ b/src/pages/practice/do/index.vue @@ -143,6 +143,7 @@ export default { ]), }, mounted() { + // 练习的做题页面跟考核的做题页面类似,只是少了个倒计时,而且不会每秒钟调接口去查询状态 this.getData() this.addLeaveEvent() }, diff --git a/src/setting.js b/src/setting.js index 95860c3..5f1193f 100644 --- a/src/setting.js +++ b/src/setting.js @@ -15,8 +15,8 @@ const Setting = { // 页面切换时,是否显示模拟的进度条 showProgressBar: true, // 接口请求地址 - // apiBaseURL: env === 'development' ? 'http://192.168.31.151:9000' : 'http://8.134.8.197:9000', - apiBaseURL: env === 'development' ? 'http://192.168.31.151:9000' : 'http://8.134.8.197:9000', + // apiBaseURL: env === 'development' ? 'http://192.168.31.151:9000' : 'http://112.74.110.92:9000', + apiBaseURL: env === 'development' ? 'http://112.74.110.92:9000' : 'http://112.74.110.92:9000', // 接口请求返回错误时,弹窗的持续时间,单位:秒 modalDuration: 3, // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice @@ -60,7 +60,7 @@ const Setting = { dynamicRoute: false, // 文件上传 upload: { - apiURL: 'http://8.134.8.197:8001', + apiURL: 'http://112.74.110.92:8001', maxSize: 30, }, };