Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
learn-fdc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
learn-fdc
Commits
c1ef4a70
提交
c1ef4a70
authored
1月 25, 2022
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 修改bug
上级
5e81c5d8
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
54 行增加
和
18 行删除
+54
-18
account.js
src/api/account.js
+1
-1
examCard.vue
src/components/exam/examCard.vue
+15
-10
api.js
src/modules/account/api.js
+1
-1
checkPhone.vue
src/modules/account/views/checkPhone.vue
+2
-2
Index.vue
src/modules/exam/exam/views/Index.vue
+33
-2
index.js
src/router/index.js
+1
-1
axios.js
src/utils/axios.js
+1
-1
没有找到文件。
src/api/account.js
浏览文件 @
c1ef4a70
...
...
@@ -30,7 +30,7 @@ export function getUser() {
}
// 修改用户信息
export
function
updateUser
(
data
)
{
return
httpRequest
.
post
(
'/api/
usercenter/user/update-user
'
,
data
)
return
httpRequest
.
post
(
'/api/
lms-financial/user/update-info
'
,
data
)
}
// 绑定游客
export
function
bindVisitor
(
data
)
{
...
...
src/components/exam/examCard.vue
浏览文件 @
c1ef4a70
...
...
@@ -89,7 +89,7 @@ export default {
disabled
:
false
,
// 是否禁用输入框
hasResult
:
false
,
// 是否显示解析
duration
:
0
,
// 答题所用时间
countdownTimer
:
null
,
// 倒计时计时器
countdownTimer
Clear
:
null
,
// 倒计时计时器
countdownText
:
''
,
// 倒计时显示时间
questionGroups
:
this
.
groups
,
// 所有试题分组,一组一页
currentGroupPage
:
this
.
groupPage
,
// 大题页码
...
...
@@ -157,30 +157,35 @@ export default {
}
},
beforeDestroy
()
{
clearInterval
(
this
.
countdownTimer
)
// 停止倒计时
clearInterval
(
this
.
countdownTimerClear
)
// 停止倒计时
console
.
log
(
'countdownTimer111'
)
// clearInterval(this.countdownTimerClear) // 停止倒计时
},
methods
:
{
// 倒计时
countDown
(
time
)
{
let
sec
=
parseInt
(
time
)
clearInterval
(
this
.
countdownTimer
)
this
.
countdownTimer
=
setInterval
(()
=>
{
clearInterval
(
this
.
countdownTimerClear
)
// clearInterval(this.countdownTimerClear)
this
.
countdownTimerClear
=
setInterval
(()
=>
{
sec
--
if
(
sec
===
0
)
{
clearInterval
(
this
.
countdownTimer
)
clearInterval
(
this
.
countdownTimer
Clear
)
this
.
isCountDownEnd
=
true
this
.
$alert
(
'考试时间结束,自动提交试卷'
,
''
,
{
confirmButtonText
:
'确定'
,
callback
:
action
=>
{
this
.
submit
()
}
})
// 是否显示解析
// this.$alert('考试时间结束,自动提交试卷', '', {
// confirmButtonText: '确定',
// callback: action => {
// this.submit()
// }
// }) // 是否显示解析
return
false
}
this
.
countdownText
=
this
.
secondToDate
(
sec
)
// 倒计时显示时间
this
.
duration
++
this
.
$emit
(
'timeupdate'
,
this
.
duration
,
this
.
questionGroups
)
},
1000
)
// clearInterval(this.countdownTimerClear)
},
secondToDate
(
result
)
{
const
h
=
Math
.
floor
(
result
/
3600
)
<
10
?
'0'
+
Math
.
floor
(
result
/
3600
)
:
Math
.
floor
(
result
/
3600
)
...
...
src/modules/account/api.js
浏览文件 @
c1ef4a70
...
...
@@ -30,7 +30,7 @@ export function getUser() {
}
// 修改用户信息
export
function
updateUser
(
data
)
{
return
httpRequest
.
post
(
'/api/
usercenter/user/update-user
'
,
data
)
return
httpRequest
.
post
(
'/api/
lms-financial/user/update-info
'
,
data
)
}
// 绑定游客
export
function
bindVisitor
(
data
)
{
...
...
src/modules/account/views/checkPhone.vue
浏览文件 @
c1ef4a70
...
...
@@ -10,10 +10,10 @@
<countdown
slot=
"suffix"
size=
"mini"
@
start=
"handlePhoneCode"
ref=
"countdown"
></countdown>
</el-input>
</el-form-item>
<div
style=
"margin-bottom: 10px; margin-top: 40px; text-align: right"
>
<
!--
<
div
style=
"margin-bottom: 10px; margin-top: 40px; text-align: right"
>
<span>
如手机无法收到验证码,请选择
</span>
<el-button
@
click=
"handleEmailCode"
>
注册邮箱接收验证码
</el-button>
</div>
</div>
-->
<template
v-if=
"isEmail"
>
<!--
<p>
请前往邮箱获取验证码后,
</p>
-->
<el-form-item
label=
"输入验证码"
prop=
"code"
>
...
...
src/modules/exam/exam/views/Index.vue
浏览文件 @
c1ef4a70
...
...
@@ -66,7 +66,8 @@ export default {
noticeTimes
:
null
,
noticeText
:
'我已阅读,开始考试(20秒)'
,
isRead
:
false
,
curExamId
:
''
curExamId
:
''
,
curExamTitle
:
''
}
},
mounted
()
{
...
...
@@ -75,11 +76,19 @@ export default {
})
},
methods
:
{
dataInit
(
callBack
)
{
api
.
getExamList
().
then
(
response
=>
{
if
(
callBack
)
{
callBack
(
response
)
}
})
},
goPage
()
{
this
.
$router
.
push
({
path
:
'/exam/exam/exam'
,
query
:
{
id
:
this
.
curExamId
id
:
this
.
curExamId
,
title
:
this
.
curExamTitle
}
})
},
...
...
@@ -113,8 +122,28 @@ export default {
case
101
:
this
.
dialogVisible
=
true
this
.
curExamId
=
data
.
id
this
.
curExamTitle
=
data
.
paper_title
break
case
102
:
api
.
getExamList
().
then
((
res
)
=>
{
const
findTimes
=
res
.
data
.
find
(
id
=>
id
.
id
===
data
.
id
).
remaining_times_s
if
(
findTimes
<
5
)
{
this
.
$alert
(
'考试时间已到'
,
{
confirmButtonText
:
'查看结果'
,
callback
:
action
=>
{
if
(
action
===
'confirm'
)
{
this
.
$router
.
push
({
path
:
'/exam/exam/result'
,
query
:
{
exam_id
:
data
.
id
,
title
:
data
.
paper_title
,
is_create
:
1
}
})
}
}
})
}
else
{
this
.
$router
.
push
({
path
:
'/exam/exam/exam'
,
query
:
{
...
...
@@ -123,6 +152,8 @@ export default {
title
:
data
.
paper_title
}
})
}
})
break
case
103
:
this
.
$router
.
push
({
...
...
src/router/index.js
浏览文件 @
c1ef4a70
...
...
@@ -10,7 +10,7 @@ VueRouter.prototype.push = function push(location, onResolve, onReject) {
}
const
routes
=
[
{
path
:
'
*'
,
redirect
:
'/index
'
},
{
path
:
'
/index'
,
redirect
:
'/notice
'
},
{
path
:
'/'
,
redirect
:
'/notice'
}
]
...
...
src/utils/axios.js
浏览文件 @
c1ef4a70
...
...
@@ -56,7 +56,7 @@ httpRequest.interceptors.response.use(
if
(
status
===
403
)
{
window
.
location
.
href
=
`
${
import
.
meta
.
env
.
VITE_LOGIN_URL
}
?rd=
${
encodeURIComponent
(
window
.
location
.
href
)}
`
}
else
if
(
status
===
401
)
{
router
.
push
(
'/
index
'
)
router
.
push
(
'/
notice
'
)
}
else
{
Message
.
error
(
message
||
error
.
response
.
data
)
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论