Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-exam-show
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-exam-show
Commits
bdbab561
提交
bdbab561
authored
12月 02, 2020
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改bug
上级
541a744b
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
53 行增加
和
18 行删除
+53
-18
.config.dev.js
.config.dev.js
+16
-16
LoginAction.js
src/action/LoginAction.js
+1
-0
login_api.js
src/api/login_api.js
+1
-0
question.vue
src/components/exam/question.vue
+9
-2
examAnswer.vue
src/pages/exam/examAnswer.vue
+14
-0
index.vue
src/pages/login/index.vue
+12
-0
没有找到文件。
.config.dev.js
浏览文件 @
bdbab561
module
.
exports
=
{
domain
:
'dev.ezijing.com'
,
url
:
'https://x-exam.ezijing.com/api'
,
url
:
'https://x-exam
2
.ezijing.com/api'
,
isEnableToIphoneDebugger
:
false
,
// apiBaseURL: '//demo-login.ezijing.com/',
webpack
:
{
...
...
@@ -13,21 +13,21 @@ module.exports = {
devServer
:
{
proxy
:
{
/* 多个代理 */
// '/api
': {
// target: $GLOBAL.webConf.url
,
//
selfHandleResponse: false,
//
// selfHandleResponse: true, // 自定义 响应结构
//
secure: false, // 如果是https接口,需要配置这个参数
//
changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
//
followRedirects: true, // 由于重定向307,所以跟随重定向直接返回一个接口
//
logLevel: 'info', // 日志打印级别
//
headers: {
//
'Referer': $GLOBAL.webConf.url
//
},
// pathRewrite: {
// '^/api': '/' // 需要rewrite重写的
// }
//
}
'/api/call/
'
:
{
target
:
'https://test-microservice-x-exam-service-api.ezijing.com'
,
selfHandleResponse
:
false
,
// selfHandleResponse: true, // 自定义 响应结构
secure
:
false
,
// 如果是https接口,需要配置这个参数
changeOrigin
:
true
,
// 如果接口跨域,需要进行这个参数配置
followRedirects
:
true
,
// 由于重定向307,所以跟随重定向直接返回一个接口
logLevel
:
'info'
,
// 日志打印级别
//
headers: {
//
'Referer': $GLOBAL.webConf.url
//
},
// pathRewrite: {
// '^/api': '/' // 需要rewrite重写的
// }
}
}
}
},
...
...
src/action/LoginAction.js
浏览文件 @
bdbab561
...
...
@@ -8,6 +8,7 @@ export default class LoginAction extends BaseACTION {
userLogin
(
examId
,
obj
)
{
return
Login
.
userLogin
(
examId
,
obj
).
then
(
res
=>
res
)
}
/* 确认信息 */
confirmInfo
(
examId
,
obj
)
{
return
Login
.
confirmInfo
(
examId
,
obj
).
then
(
res
=>
res
)
}
sendExamInfo
(
obj
)
{
return
Login
.
sendExamInfo
(
obj
).
then
(
res
=>
res
)
}
// /* post传输方式 */
// postTest (obj = {}) {
// return Login.postTest(obj).then(res => {
...
...
src/api/login_api.js
浏览文件 @
bdbab561
...
...
@@ -20,4 +20,5 @@ export default class TestAPI extends BaseAPI {
// * 当前登录用户,检测是否该系统有权限
// */
// getInfo = () => this.post('/user_center/get_user_info', {}, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
sendExamInfo
=
(
obj
=
{})
=>
this
.
post
(
'/call/v1/exam/student-status/commit'
,
obj
,
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
}
src/components/exam/question.vue
浏览文件 @
bdbab561
...
...
@@ -86,12 +86,20 @@ export default {
data
()
{
return
{
questionData
:
{},
clearTime
:
null
clearTime
:
null
,
setCacheTime
:
null
}
},
beforeDestroy
()
{
clearInterval
(
this
.
setCacheTime
)
},
created
()
{
},
mounted
()
{
clearInterval
(
this
.
setCacheTime
)
this
.
setCacheTime
=
setInterval
(()
=>
{
this
.
setCache
()
},
3000
)
this
.
dataCombined
()
},
methods
:
{
...
...
@@ -268,7 +276,6 @@ export default {
watch
:
{
changeQuestionIndex
(
newV
,
oldV
)
{
this
.
dataCombined
()
this
.
setCache
()
this
.
signCallback
()
this
.
$nextTick
(()
=>
{
this
.
createTag
()
...
...
src/pages/exam/examAnswer.vue
浏览文件 @
bdbab561
...
...
@@ -97,6 +97,7 @@ export default {
}
},
mounted
()
{
this
.
sendExamInfo
(
3
)
this
.
setTick
()
this
.
getTopic
()
this
.
countHeight
()
...
...
@@ -105,6 +106,17 @@ export default {
}
},
methods
:
{
sendExamInfo
(
status
)
{
const
param
=
{
student_id
:
this
.
sInfo
.
info
.
student_id
,
exam_id
:
this
.
examInfo
.
exam_id
,
status
:
status
}
action
.
Login
.
sendExamInfo
(
param
).
then
(
res
=>
{
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
},
countHeight
()
{
this
.
contentHeight
=
parseInt
(
document
.
body
.
clientHeight
-
(
this
.
getDom
(
'head-h'
).
offsetHeight
+
this
.
getDom
(
'foot-h'
).
offsetHeight
))
},
...
...
@@ -170,6 +182,7 @@ export default {
return
countNum
},
endExamRequest
(
n
)
{
this
.
sendExamInfo
(
5
)
const
param
=
{
answer
:
JSON
.
stringify
(
this
.
questionParams
.
answerRecord
)
}
...
...
@@ -180,6 +193,7 @@ export default {
path
:
'/examEnd'
})
}
this
.
sendExamInfo
(
6
)
window
.
localStorage
.
setItem
(
'showflag'
,
'true'
)
}).
catch
(
err
=>
{
if
(
err
.
message
.
indexOf
(
'error'
)
!==
-
1
)
{
...
...
src/pages/login/index.vue
浏览文件 @
bdbab561
...
...
@@ -77,6 +77,17 @@ export default {
})
},
methods
:
{
sendExamInfo
(
studentId
)
{
const
param
=
{
student_id
:
studentId
,
exam_id
:
this
.
data
.
exam_id
,
status
:
2
}
action
.
Login
.
sendExamInfo
(
param
).
then
(
res
=>
{
}).
catch
(
err
=>
{
console
.
log
(
err
)
})
},
closePop
()
{
this
.
fullScreen
()
this
.
isPopup
=
false
...
...
@@ -145,6 +156,7 @@ export default {
action
.
Login
.
userLogin
(
this
.
data
.
exam_id
,
{
examinee_number
:
this
.
examineeNumber
}).
then
(
res
=>
{
window
.
localStorage
.
setItem
(
'studentInfo'
,
JSON
.
stringify
(
res
))
const
status
=
parseInt
(
res
.
sheet_status
)
this
.
sendExamInfo
(
res
.
info
.
student_id
)
if
(
status
===
0
)
{
this
.
$router
.
replace
({
name
:
'confirmInfo'
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论