Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-exam-show
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-exam-show
Commits
3ad33ebe
提交
3ad33ebe
authored
7月 21, 2021
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
cb0a7d22
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
72 行增加
和
56 行删除
+72
-56
index.vue
src/pages/login/index.vue
+72
-56
没有找到文件。
src/pages/login/index.vue
浏览文件 @
3ad33ebe
...
...
@@ -4,20 +4,32 @@
<div
class=
"mian-cont900 por"
>
<div
class=
"title"
>
{{
data
.
name
}}
</div>
<div
class=
"exam-time"
>
<div
class=
"tit"
>
考试时间
1
</div>
<div
class=
"tit"
>
考试时间
</div>
<div
class=
"line"
></div>
<div
class=
"time"
>
{{
data
.
start_time
}}
-
{{
data
.
end_time
}}
</div>
<div
class=
"time"
>
{{
data
.
start_time
}}
-
{{
data
.
end_time
}}
</div>
</div>
<div
class=
"mian-form"
>
<!--
<div
class=
"form prohibit"
>
-->
<div
:class=
"loginParam.is ? 'form prohibit' : 'form'"
>
<div
class=
"tips"
>
{{
tips
}}
</div>
<!-- 您登录的次数已超过最大限制 -->
<input
type=
"text"
@
click=
"fullScreen"
v-model=
"examineeNumber"
placeholder=
"请输入准考证号"
v-show=
"!loginParam.is"
@
keydown=
"keydown($event)"
>
<input
type=
"text"
@
click=
"fullScreen"
placeholder=
"请输入准考证号"
readonly=
"readonly"
class=
"prohibit"
v-show=
"loginParam.is"
>
<div
class=
"btn"
@
click=
"login"
>
登录
</div>
<input
type=
"text"
@
click=
"fullScreen"
v-model=
"examineeNumber"
placeholder=
"请输入准考证号"
v-show=
"!loginParam.is"
@
keydown=
"keydown($event)"
/>
<input
type=
"text"
@
click=
"fullScreen"
placeholder=
"请输入准考证号"
readonly=
"readonly"
class=
"prohibit"
v-show=
"loginParam.is"
/>
<div
class=
"btn"
@
click=
"login"
>
登录1
</div>
<!--
<div
class=
"btn prohibit"
>
登录
</div>
-->
<div
class=
"time-tips"
v-show=
"loginParam.is"
>
{{
loginParam
.
countTimeText
}}
</div>
</div>
...
...
@@ -56,7 +68,8 @@ export default {
}
},
mounted
()
{
action
.
Login
.
getExamInfo
(
this
.
$route
.
params
.
examId
).
then
(
res
=>
{
action
.
Login
.
getExamInfo
(
this
.
$route
.
params
.
examId
)
.
then
(
res
=>
{
window
.
localStorage
.
setItem
(
'examInfo'
,
JSON
.
stringify
(
res
))
this
.
data
=
res
if
(
this
.
getEnabledTime
()
<
0
)
{
...
...
@@ -73,8 +86,8 @@ export default {
},
1000
)
this
.
loginParam
.
is
=
false
}
}).
finally
(
res
=>
{
})
.
finally
(
res
=>
{})
},
methods
:
{
sendExamInfo
(
studentId
)
{
...
...
@@ -83,8 +96,9 @@ export default {
exam_id
:
this
.
data
.
exam_id
,
status
:
2
}
action
.
Login
.
sendExamInfo
(
param
).
then
(
res
=>
{
}).
catch
(
err
=>
{
action
.
Login
.
sendExamInfo
(
param
)
.
then
(
res
=>
{})
.
catch
(
err
=>
{
console
.
log
(
err
)
})
},
...
...
@@ -124,23 +138,24 @@ export default {
},
// 倒计时
countDown
(
time
)
{
const
lefttime
=
parseInt
(
(
time
)
/
1000
)
const
h
=
this
.
addZero
(
parseInt
(
lefttime
/
(
60
*
60
)
%
24
))
const
m
=
this
.
addZero
(
parseInt
(
lefttime
/
60
%
60
))
const
lefttime
=
parseInt
(
time
/
1000
)
const
h
=
this
.
addZero
(
parseInt
(
(
lefttime
/
(
60
*
60
)
)
%
24
))
const
m
=
this
.
addZero
(
parseInt
(
(
lefttime
/
60
)
%
60
))
const
s
=
this
.
addZero
(
parseInt
(
lefttime
%
60
))
this
.
loginParam
.
countTimeText
=
`距离开考还有:
${
h
}
:
${
m
}
:
${
s
}
`
},
// 开启全屏
fullScreen
()
{
const
el
=
document
.
documentElement
const
rfs
=
el
.
requestFullScreen
||
el
.
webkitRequestFullScreen
||
el
.
mozRequestFullScreen
||
el
.
msRequestFullscreen
const
rfs
=
el
.
requestFullScreen
||
el
.
webkitRequestFullScreen
||
el
.
mozRequestFullScreen
||
el
.
msRequestFullscreen
if
(
typeof
rfs
!==
'undefined'
&&
rfs
)
{
rfs
.
call
(
el
)
}
return
false
},
// 禁止input输入空格
keydown
(
event
)
{
keydown
(
event
)
{
console
.
log
(
event
.
keyCode
)
if
(
event
.
keyCode
===
32
||
event
.
keyCode
===
187
||
event
.
keyCode
===
107
)
{
event
.
returnValue
=
false
...
...
@@ -153,7 +168,8 @@ export default {
this
.
$alert
(
'请输入准考证号'
)
return
false
}
action
.
Login
.
userLogin
(
this
.
data
.
exam_id
,
{
examinee_number
:
this
.
examineeNumber
}).
then
(
res
=>
{
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)
...
...
@@ -162,8 +178,9 @@ export default {
name
:
'confirmInfo'
})
}
status
===
1
&&
(
this
.
$alert
(
'已提交考卷'
))
}).
catch
(
err
=>
{
status
===
1
&&
this
.
$alert
(
'已提交考卷'
)
})
.
catch
(
err
=>
{
if
(
err
.
message
.
indexOf
(
'error'
)
!==
-
1
)
{
this
.
$alert
(
'网络异常,请保持网络通畅'
,
{
callback
:
action
=>
{}
...
...
@@ -180,18 +197,17 @@ export default {
}
</
script
>
<
style
lang=
"scss"
scoped
>
.welcome-msg
{
.welcome-msg
{
padding-top
:
130px
;
&
:
:
v-deep
img
{
&
:
:
v-deep
img
{
width
:
100%
;
display
:
block
;
}
}
.mian-cont900
{
.mian-cont900
{
margin
:
0
auto
;
width
:
900px
;
&
.por
{
&
.por
{
position
:
absolute
;
bottom
:
0
;
left
:
50%
;
...
...
@@ -199,119 +215,119 @@ export default {
margin-bottom
:
-115px
;
}
}
.login-box
{
.login-box
{
width
:
100%
;
height
:
100%
;
background
:
#fff
;
.content
{
.content
{
position
:
relative
;
width
:
100%
;
height
:
50%
;
// height: 387px;
background
:
url(../../assets/images/login-bg.png)
;
background-size
:
100%
100%
;
.title
{
.title
{
padding-top
:
110px
;
font-size
:
36px
;
font-weight
:
600
;
color
:
#
FFFFFF
;
color
:
#
ffffff
;
line-height
:
50px
;
letter-spacing
:
7px
;
text-shadow
:
0px
2px
4px
rgba
(
0
,
0
,
0
,
0
.5
);
}
.exam-time
{
.exam-time
{
padding-top
:
20px
;
.tit
{
.tit
{
font-size
:
18px
;
font-weight
:
bold
;
color
:
#
FFFFFF
;
color
:
#
ffffff
;
line-height
:
25px
;
text-shadow
:
0px
2px
4px
rgba
(
0
,
0
,
0
,
0
.5
);
}
.line
{
.line
{
width
:
24px
;
height
:
2px
;
background
:
#
FFFFFF
;
background
:
#
ffffff
;
box-shadow
:
0px
2px
4px
0px
rgba
(
0
,
0
,
0
,
0
.5
);
margin
:
10px
0
;
}
.time
{
.time
{
height
:
25px
;
font-size
:
18px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-weight
:
400
;
color
:
#
FFFFFF
;
color
:
#
ffffff
;
line-height
:
25px
;
text-shadow
:
0px
2px
4px
rgba
(
0
,
0
,
0
,
0
.5
);
}
}
.mian-form
{
.mian-form
{
width
:
100%
;
height
:
230px
;
background
:
#
FFFFFF
;
background
:
#
ffffff
;
box-shadow
:
0px
2px
12px
0px
rgba
(
177
,
186
,
195
,
0
.3
);
border-radius
:
5px
;
margin-top
:
20px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
.form
{
.form
{
position
:
relative
;
display
:
flex
;
&
.prohibit
{
input
{
background
:
#
EEEEEE
;
border
:
1px
solid
#
CCCCCC
;
&
.prohibit
{
input
{
background
:
#
eeeeee
;
border
:
1px
solid
#
cccccc
;
}
.btn
{
.btn
{
color
:
#ccc
;
background
:
#eee
;
}
}
}
input
{
input
{
padding-left
:
15px
;
width
:
585px
;
height
:
40px
;
border-radius
:
4px
;
border
:
1px
solid
#
CCCCCC
;
border
:
1px
solid
#
cccccc
;
font-size
:
14px
;
outline
:
none
;
&
:
:-
webkit-input-placeholder
{
&
:
:-
webkit-input-placeholder
{
color
:
#999999
;
}
&
.prohibit
{
background
:
#
EEEEEE
;
border
:
1px
solid
#
CCCCCC
;
&
.prohibit
{
background
:
#
eeeeee
;
border
:
1px
solid
#
cccccc
;
}
}
.btn
{
.btn
{
width
:
180px
;
height
:
42px
;
background
:
#
C
01540
;
background
:
#
c
01540
;
border-radius
:
4px
;
margin-left
:
20px
;
font-size
:
14px
;
font-weight
:
bold
;
color
:
#
FFFFFF
;
color
:
#
ffffff
;
line-height
:
40px
;
text-align
:
center
;
font-style
:
normal
;
&
.prohibit
{
&
.prohibit
{
color
:
#ccc
;
background
:
#eee
;
}
}
.tips
{
.tips
{
position
:
absolute
;
top
:
-80%
;
left
:
0
;
font-size
:
18px
;
font-weight
:
400
;
color
:
#
C
01540
;
color
:
#
c
01540
;
line-height
:
25px
;
}
.time-tips
{
.time-tips
{
position
:
absolute
;
bottom
:
-80%
;
left
:
0
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论