Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
campSite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨梦雪
campSite
Commits
2a9d7b5d
Commit
2a9d7b5d
authored
Oct 14, 2021
by
杨梦雪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
0d845aa4
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
635 additions
and
526 deletions
+635
-526
src/components/index/SignUp/confirm.vue
src/components/index/SignUp/confirm.vue
+36
-22
src/request/index/login.js
src/request/index/login.js
+5
-0
src/request/index/register.js
src/request/index/register.js
+9
-2
src/request/index/signUp.js
src/request/index/signUp.js
+8
-0
src/router/index.js
src/router/index.js
+4
-4
src/router/index/camp.js
src/router/index/camp.js
+1
-1
src/views/index/camp/Index.vue
src/views/index/camp/Index.vue
+1
-1
src/views/index/camp/SignUp.vue
src/views/index/camp/SignUp.vue
+13
-7
src/views/index/login/Login.vue
src/views/index/login/Login.vue
+15
-16
src/views/index/login/Register.vue
src/views/index/login/Register.vue
+325
-318
src/views/index/login/Reset.vue
src/views/index/login/Reset.vue
+216
-153
vue.config.js
vue.config.js
+2
-2
No files found.
src/components/index/SignUp/confirm.vue
View file @
2a9d7b5d
<
template
>
<
template
>
<!--底部-->
<!--底部-->
<div
class=
"confirm"
>
<div
class=
"confirm"
>
<div
class=
"title"
>
2021年南开大学历史学科暑假营报名须知
</div>
<div
class=
"title"
>
2021年南开大学历史学科暑假营报名须知
</div>
<p>
<p>
南开大学是教育部直属重点综合性大学,是敬爱的周恩来总理的母校。新中国成立以来,学校发展始终得到党和国家的亲切关怀。毛泽东主席题写校名、亲临视察;周恩来总理三回母校指导;邓小平同志会见数学大师陈省身,批示成立南开数学研究所;江泽民同志、胡锦涛同志先后视察南开。特别是党的十八大以来,习近平总书记多次对南开的发展给予肯定,并对相关工作回信和勉励,更在百年校庆之际亲临南开视察。
南开大学是教育部直属重点综合性大学,是敬爱的周恩来总理的母校。新中国成立以来,学校发展始终得到党和国家的亲切关怀。毛泽东主席题写校名、亲临视察;周恩来总理三回母校指导;邓小平同志会见数学大师陈省身,批示成立南开数学研究所;江泽民同志、胡锦涛同志先后视察南开。特别是党的十八大以来,习近平总书记多次对南开的发展给予肯定,并对相关工作回信和勉励,更在百年校庆之际亲临南开视察。
</p>
</p>
<p>
<p>
南开大学是教育部直属重点综合性大学,是敬爱的周恩来总理的母校。新中国成立以来,学校发展始终得到党和国家的亲切关怀。毛泽东主席题写校名、亲临视察;周恩来总理三回母校指导;邓小平同志会见数学大师陈省身,批示成立南开数学研究所;江泽民同志、胡锦涛同志先后视察南开。特别是党的十八大以来,习近平总书记多次对南开的发展给予肯定,并对相关工作回信和勉励,更在百年校庆之际亲临南开视察。
南开大学是教育部直属重点综合性大学,是敬爱的周恩来总理的母校。新中国成立以来,学校发展始终得到党和国家的亲切关怀。毛泽东主席题写校名、亲临视察;周恩来总理三回母校指导;邓小平同志会见数学大师陈省身,批示成立南开数学研究所;江泽民同志、胡锦涛同志先后视察南开。特别是党的十八大以来,习近平总书记多次对南开的发展给予肯定,并对相关工作回信和勉励,更在百年校庆之际亲临南开视察。
</p>
</p>
<div
class=
"line"
></div>
<div
class=
"line"
></div>
<p>
<p>
南开大学是教育部直属重点综合性大学,是敬爱的周恩来总理的母校。新中国成立以来,学校发展始终得到党和国家的亲切关怀。毛泽东主席题写校名、亲临视察;
南开大学是教育部直属重点综合性大学,是敬爱的周恩来总理的母校。新中国成立以来,学校发展始终得到党和国家的亲切关怀。毛泽东主席题写校名、亲临视察;
</p>
</p>
<div>
<div>
<img
src=
"../../../assets/img/signUp/computer.png"
alt=
""
/>
<img
src=
"../../../assets/img/signUp/computer.png"
alt=
""
/>
</div>
</div>
<div
class=
"check"
>
<div
class=
"check"
>
<el-checkbox
v-model=
"checked"
<el-checkbox
v-model=
"checked"
>
我已阅读并了解《2021年南开大学历史学科暑假营报名须知》
</el-checkbox
>
我已阅读并了解《2021年南开大学历史学科暑假营报名须知》
</el-checkbox
>
>
</div>
</div>
<div
class=
"btn"
>
<div
class=
"btn"
>
<el-button
@
click=
"next()"
>
下一步
</el-button>
<el-button
:disabled=
'!checked'
@
click=
"next()"
>
下一步
</el-button>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
/* eslint-disable */
/* eslint-disable */
export
default
{
export
default
{
name
:
"
Confirm
"
,
name
:
"
Confirm
"
,
data
()
{
return
{
checked
:
false
};
},
methods
:{
next
(){
// if(!this.checked){
// return this.$message.console.error('请');
// }
console
.
log
(
this
.
checked
)
this
.
$router
.
push
(
"
/signUp/invitation
"
);
}
}
};
};
</
script
>
</
script
>
...
...
src/request/index/login.js
View file @
2a9d7b5d
...
@@ -3,8 +3,10 @@ import {
...
@@ -3,8 +3,10 @@ import {
request
request
}
from
'
./network
'
}
from
'
./network
'
const
identity
=
localStorage
.
getItem
(
'
index-identity
'
)
// 登录
// 登录
export
function
login
(
data
)
{
export
function
login
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
return
request
({
method
:
'
post
'
,
method
:
'
post
'
,
url
:
'
/web/auth/login
'
,
url
:
'
/web/auth/login
'
,
...
@@ -15,6 +17,7 @@ export function login(data) {
...
@@ -15,6 +17,7 @@ export function login(data) {
// 退出
// 退出
export
function
logout
(
data
)
{
export
function
logout
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
return
request
({
method
:
'
post
'
,
method
:
'
post
'
,
url
:
'
/web/auth/loginOut
'
,
url
:
'
/web/auth/loginOut
'
,
...
@@ -24,6 +27,7 @@ export function logout(data) {
...
@@ -24,6 +27,7 @@ export function logout(data) {
// 通过旧密码找回密码
// 通过旧密码找回密码
export
function
changePassOld
(
data
)
{
export
function
changePassOld
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
return
request
({
method
:
'
post
'
,
method
:
'
post
'
,
url
:
'
/web/auth/changePassOld
'
,
url
:
'
/web/auth/changePassOld
'
,
...
@@ -33,6 +37,7 @@ export function changePassOld(data) {
...
@@ -33,6 +37,7 @@ export function changePassOld(data) {
// 通过验证码找回密码
// 通过验证码找回密码
export
function
changePassCode
(
data
)
{
export
function
changePassCode
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
return
request
({
method
:
'
post
'
,
method
:
'
post
'
,
url
:
'
/web/auth/changePassCode
'
,
url
:
'
/web/auth/changePassCode
'
,
...
...
src/request/index/register.js
View file @
2a9d7b5d
...
@@ -11,10 +11,17 @@ export function registerCode(data) {
...
@@ -11,10 +11,17 @@ export function registerCode(data) {
return
request
({
return
request
({
method
:
'
post
'
,
method
:
'
post
'
,
url
:
'
/web/code/registerCode
'
,
url
:
'
/web/code/registerCode
'
,
data
params
:
data
})
}
export
function
passwordCode
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
method
:
'
post
'
,
url
:
'
/web/code/passwordCode
'
,
params
:
data
})
})
}
}
// 填写注册信息
// 填写注册信息
export
function
setAccountInfo
(
data
)
{
export
function
setAccountInfo
(
data
)
{
...
...
src/request/index/signUp.js
View file @
2a9d7b5d
...
@@ -3,8 +3,10 @@ import {
...
@@ -3,8 +3,10 @@ import {
request
request
}
from
'
./network
'
}
from
'
./network
'
const
identity
=
localStorage
.
getItem
(
'
index-identity
'
)
// 报名初始化
// 报名初始化
export
function
signUpInit
(
data
)
{
export
function
signUpInit
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
return
request
({
method
:
'
post
'
,
method
:
'
post
'
,
url
:
'
/web/signUp/signUpInit
'
,
url
:
'
/web/signUp/signUpInit
'
,
...
@@ -14,6 +16,7 @@ export function signUpInit(data) {
...
@@ -14,6 +16,7 @@ export function signUpInit(data) {
// 确认报名须知
// 确认报名须知
export
function
setSignShould
(
data
)
{
export
function
setSignShould
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
return
request
({
method
:
'
post
'
,
method
:
'
post
'
,
url
:
'
/web/signUp/setSignShould
'
,
url
:
'
/web/signUp/setSignShould
'
,
...
@@ -23,6 +26,7 @@ export function setSignShould(data) {
...
@@ -23,6 +26,7 @@ export function setSignShould(data) {
// 页面个人获取
// 页面个人获取
export
function
getAccount
(
data
)
{
export
function
getAccount
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
return
request
({
method
:
'
post
'
,
method
:
'
post
'
,
url
:
'
/web/signUp/getAccount
'
,
url
:
'
/web/signUp/getAccount
'
,
...
@@ -32,6 +36,7 @@ export function getAccount(data) {
...
@@ -32,6 +36,7 @@ export function getAccount(data) {
// 获取学习成绩证明材料上传图片
// 获取学习成绩证明材料上传图片
export
function
getAchievementOss
(
data
)
{
export
function
getAchievementOss
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
return
request
({
method
:
'
post
'
,
method
:
'
post
'
,
url
:
'
/web/signUp/getAchievementOss
'
,
url
:
'
/web/signUp/getAchievementOss
'
,
...
@@ -41,6 +46,7 @@ export function getAchievementOss(data) {
...
@@ -41,6 +46,7 @@ export function getAchievementOss(data) {
// 页面个人信息保存
// 页面个人信息保存
export
function
setAccount
(
data
)
{
export
function
setAccount
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
return
request
({
method
:
'
post
'
,
method
:
'
post
'
,
url
:
'
/web/signUp/setAccount
'
,
url
:
'
/web/signUp/setAccount
'
,
...
@@ -50,6 +56,7 @@ export function setAccount(data) {
...
@@ -50,6 +56,7 @@ export function setAccount(data) {
// 获取报名省份城市
// 获取报名省份城市
export
function
getProAndCity
(
data
)
{
export
function
getProAndCity
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
return
request
({
method
:
'
post
'
,
method
:
'
post
'
,
url
:
'
/web/signUp/getProAndCity
'
,
url
:
'
/web/signUp/getProAndCity
'
,
...
@@ -59,6 +66,7 @@ export function getProAndCity(data) {
...
@@ -59,6 +66,7 @@ export function getProAndCity(data) {
// 获取报名学校
// 获取报名学校
export
function
getSchool
(
data
)
{
export
function
getSchool
(
data
)
{
data
[
'
identity
'
]
=
identity
;
return
request
({
return
request
({
method
:
'
post
'
,
method
:
'
post
'
,
url
:
'
/web/signUp/getSchool
'
,
url
:
'
/web/signUp/getSchool
'
,
...
...
src/router/index.js
View file @
2a9d7b5d
...
@@ -38,10 +38,10 @@ const routes = [{
...
@@ -38,10 +38,10 @@ const routes = [{
}
}
]
]
//
const originalPush = VueRouter.prototype.push
const
originalPush
=
VueRouter
.
prototype
.
push
//
VueRouter.prototype.push = function push (location) {
VueRouter
.
prototype
.
push
=
function
push
(
location
)
{
//
return originalPush.call(this, location).catch(err => err)
return
originalPush
.
call
(
this
,
location
).
catch
(
err
=>
err
)
//
}
}
const
router
=
new
VueRouter
({
const
router
=
new
VueRouter
({
mode
:
'
history
'
,
mode
:
'
history
'
,
...
...
src/router/index/camp.js
View file @
2a9d7b5d
export
default
[{
export
default
[{
path
:
'
/signUp
'
,
path
:
'
/signUp
/:type
'
,
name
:
'
index-signUp
'
,
name
:
'
index-signUp
'
,
component
:
()
=>
import
(
/* webpackChunkName: "login" */
'
v/index/camp/SignUp.vue
'
),
component
:
()
=>
import
(
/* webpackChunkName: "login" */
'
v/index/camp/SignUp.vue
'
),
meta
:
{
meta
:
{
...
...
src/views/index/camp/Index.vue
View file @
2a9d7b5d
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<div
class=
"cc flex"
>
<div
class=
"cc flex"
>
<div
class=
"camp_left"
>
<div
class=
"camp_left"
>
<ul
class=
"camp_left_box"
>
<ul
class=
"camp_left_box"
>
<li
@
click=
"ToSignUp"
:class=
"activeMenu == 0 ? 'active' : ''"
>
<li
@
click=
"ToSignUp"
>
<img
src=
"@/assets/img/signUp/icon-bm.png"
/>
营地报名
<img
src=
"@/assets/img/signUp/icon-bm.png"
/>
营地报名
</li>
</li>
<li
@
click=
"ToHomework"
>
<li
@
click=
"ToHomework"
>
...
...
src/views/index/camp/SignUp.vue
View file @
2a9d7b5d
...
@@ -6,11 +6,11 @@
...
@@ -6,11 +6,11 @@
<Breadcrumb>
</Breadcrumb>
<Breadcrumb>
</Breadcrumb>
</div>
</div>
</div>
</div>
<Confirm>
</Confirm>
<Confirm
v-if=
"type == 'examInfo'"
>
</Confirm>
<
!--
<Invitation>
</Invitation>
--
>
<
Invitation
v-else-if=
"type == 'invitation'"
>
</Invitation
>
<
!--
<ReferInfo>
</ReferInfo>
--
>
<
ReferInfo
v-else-if=
"type == 'referInfo'"
>
</ReferInfo
>
<
!--
<Pass>
</Pass>
--
>
<
Pass
v-else-if=
"type == 'check'"
>
</Pass
>
<
!--
<Paying>
</Paying>
--
>
<
Paying
v-else-if=
"type == 'pay'"
>
</Paying
>
</div>
</div>
</
template
>
</
template
>
...
@@ -33,7 +33,13 @@ export default {
...
@@ -33,7 +33,13 @@ export default {
Paying
,
Paying
,
},
},
data
()
{
data
()
{
return
{};
return
{
type
:
"
examInfo
"
,
};
},
created
()
{
this
.
type
=
this
.
$route
.
params
.
type
;
console
.
log
(
this
.
$route
);
},
},
};
};
</
script
>
</
script
>
...
@@ -45,7 +51,7 @@ export default {
...
@@ -45,7 +51,7 @@ export default {
.signUp
{
.signUp
{
background
:
#ffffff
;
background
:
#ffffff
;
width
:
856px
;
width
:
856px
;
.signUp_titile
{
.signUp_titile
{
font-size
:
24px
;
font-size
:
24px
;
font-weight
:
500
;
font-weight
:
500
;
...
...
src/views/index/login/Login.vue
View file @
2a9d7b5d
...
@@ -108,17 +108,11 @@ export default {
...
@@ -108,17 +108,11 @@ export default {
methods
:
{
methods
:
{
// 忘记账号/密码
// 忘记账号/密码
forgetPwd
()
{
forgetPwd
()
{
// window.localStorage.setItem("f_forgetpwd", 0);
this
.
$router
.
replace
({
name
:
"
index-reset
"
});
this
.
$router
.
replace
({
name
:
"
index-reset
"
});
},
},
// 去注册
// 去注册
register
()
{
register
()
{
// this.dialogFormFu = {
// title: "提示",
// message: 1,
// };
// this.dialogVisibleFu = true;
this
.
$router
.
replace
({
name
:
"
index-register
"
});
this
.
$router
.
replace
({
name
:
"
index-register
"
});
},
},
// 改变密码显示状态
// 改变密码显示状态
...
@@ -127,16 +121,21 @@ export default {
...
@@ -127,16 +121,21 @@ export default {
},
},
// 登录
// 登录
submitForm
()
{
submitForm
()
{
login
({
this
.
$refs
[
"
loginFormRef
"
].
validate
((
valid
)
=>
{
phone
:
this
.
loginForm
.
phone
,
if
(
!
valid
)
return
;
password
:
this
.
loginForm
.
password
,
login
({
}).
then
((
res
)
=>
{
phone
:
this
.
loginForm
.
phone
,
console
.
log
(
res
);
password
:
this
.
loginForm
.
password
,
if
(
res
.
code
!=
200
)
{
}).
then
((
res
)
=>
{
return
this
.
$message
.
error
(
res
.
message
);
console
.
log
(
res
);
}
if
(
res
.
status
!=
200
)
{
return
this
.
$message
.
error
(
res
.
message
);
this
.
$router
.
replace
({
name
:
"
cerificateIndex
"
});
}
this
.
$message
.
success
(
"
登录成功
"
);
// token存储
window
.
localStorage
.
setItem
(
"
index-token
"
,
res
.
token
);
this
.
$router
.
replace
({
path
:
"
/signUp/examInfo
"
});
});
});
});
},
},
},
},
...
...
src/views/index/login/Register.vue
View file @
2a9d7b5d
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
class=
"demo-registerForm"
class=
"demo-registerForm"
>
>
<el-form-item
prop=
"phone"
>
<el-form-item
prop=
"phone"
>
<img
class=
"img_l"
src=
"@/assets/img/reset/username.png"
alt=
""
/>
<img
class=
"img_l"
src=
"@/assets/img/reset/username.png"
alt=
""
/>
<el-input
<el-input
v-model=
"registerForm.phone"
v-model=
"registerForm.phone"
placeholder=
"请输入手机号"
placeholder=
"请输入手机号"
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"code"
>
<el-form-item
prop=
"code"
>
<img
class=
"img_l"
src=
"@/assets/img/reset/code.png"
alt=
""
/>
<img
class=
"img_l"
src=
"@/assets/img/reset/code.png"
alt=
""
/>
<el-input
<el-input
v-model=
"registerForm.code"
v-model=
"registerForm.code"
placeholder=
"请输入短信验证码"
placeholder=
"请输入短信验证码"
...
@@ -29,12 +29,14 @@
...
@@ -29,12 +29,14 @@
></el-input>
></el-input>
<!-- 短信验证码 -->
<!-- 短信验证码 -->
<div
class=
"phoneCode"
>
<div
class=
"phoneCode"
>
<span
class=
"code"
v-show=
"show"
@
click=
"getCode"
>
获取验证码
</span>
<span
class=
"code"
v-show=
"show"
@
click=
"getCode"
>
获取验证码
</span
>
<span
v-show=
"!show"
class=
"count"
>
{{
count
}}
s
</span>
<span
v-show=
"!show"
class=
"count"
>
{{
count
}}
s
</span>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"password"
>
<el-form-item
prop=
"password"
>
<img
class=
"img_l"
src=
"@/assets/img/reset/password.png"
alt=
""
/>
<img
class=
"img_l"
src=
"@/assets/img/reset/password.png"
alt=
""
/>
<el-input
<el-input
v-model=
"registerForm.password"
v-model=
"registerForm.password"
:type=
"isShowPwd ? 'password' : 'text'"
:type=
"isShowPwd ? 'password' : 'text'"
...
@@ -58,7 +60,7 @@
...
@@ -58,7 +60,7 @@
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"rq_password"
>
<el-form-item
prop=
"rq_password"
>
<img
class=
"img_l"
src=
"@/assets/img/reset/password.png"
alt=
""
/>
<img
class=
"img_l"
src=
"@/assets/img/reset/password.png"
alt=
""
/>
<el-input
<el-input
v-model=
"registerForm.rq_password"
v-model=
"registerForm.rq_password"
placeholder=
"请再次输入登录密码"
placeholder=
"请再次输入登录密码"
...
@@ -80,115 +82,118 @@
...
@@ -80,115 +82,118 @@
</
template
>
</
template
>
<
script
>
<
script
>
/* eslint-disable */
/* eslint-disable */
// 请求接口
// 请求接口
import
{
registerCode
,
setAccountInfo
}
from
"
r/index/register
"
;
import
{
registerCode
,
setAccountInfo
}
from
"
r/index/register
"
;
import
{
mobileCheck
}
from
"
@/common/utils.js
"
;
import
{
mobileCheck
}
from
"
@/common/utils.js
"
;
export
default
{
export
default
{
name
:
"
index-register
"
,
name
:
"
index-register
"
,
data
()
{
data
()
{
const
pwdCheck
=
async
(
rule
,
value
,
callback
)
=>
{
const
pwdCheck
=
async
(
rule
,
value
,
callback
)
=>
{
if
(
value
!==
this
.
stepForm
.
password
)
{
if
(
value
!==
this
.
registerForm
.
password
)
{
callback
(
new
Error
(
"
两次输入的密码不一致
"
));
callback
(
new
Error
(
"
两次输入的密码不一致
"
));
}
else
{
}
else
{
callback
();
callback
();
}
}
};
};
return
{
return
{
// 手机验证短信
// 手机验证短信
show
:
true
,
show
:
true
,
count
:
""
,
count
:
""
,
timer
:
null
,
timer
:
null
,
isShowPwd
:
true
,
// 控制密码显示隐藏
isShowPwd
:
true
,
// 控制密码显示隐藏
registerForm
:
{
registerForm
:
{
phone
:
""
,
phone
:
""
,
code
:
""
,
code
:
""
,
password
:
""
,
password
:
""
,
rq_password
:
""
,
rq_password
:
""
,
},
},
// 表单验证规则对象
// 表单验证规则对象
registerRules
:
{
registerRules
:
{
// 对手机号进行校验
// 对手机号进行校验
phone
:
[
phone
:
[
{
required
:
true
,
message
:
"
请输入手机号
"
,
trigger
:
"
blur
"
},
{
required
:
true
,
message
:
"
请输入手机号
"
,
trigger
:
"
blur
"
},
{
{
validator
:
function
(
rule
,
value
,
callback
)
{
validator
:
function
(
rule
,
value
,
callback
)
{
if
(
mobileCheck
(
value
)
===
false
)
{
if
(
mobileCheck
(
value
)
===
false
)
{
callback
(
new
Error
(
"
请输入正确的手机号
"
));
callback
(
new
Error
(
"
请输入正确的手机号
"
));
}
else
{
}
else
{
callback
();
callback
();
}
}
},
trigger
:
"
blur
"
,
},
],
// 对验证码进行校验
code
:
[
{
required
:
true
,
message
:
"
请输入验证码
"
,
trigger
:
"
blur
"
},
{
min
:
6
,
max
:
20
,
message
:
"
请输入正确的验证码
"
,
trigger
:
"
blur
"
},
],
// 对密码进行校验
password
:
[
{
required
:
true
,
message
:
"
请输入密码
"
,
trigger
:
"
blur
"
},
{
min
:
6
,
max
:
20
,
message
:
"
请输入正确的密码
"
,
trigger
:
"
blur
"
},
],
// 对密码进行校验
rq_password
:
[
{
required
:
true
,
message
:
"
请输入确认密码
"
,
trigger
:
"
blur
"
},
{
validator
:
pwdCheck
,
trigger
:
"
blur
"
,
},
},
],
trigger
:
"
blur
"
,
},
},
};
],
// 对验证码进行校验
code
:
[
{
required
:
true
,
message
:
"
请输入验证码
"
,
trigger
:
"
blur
"
},
{
min
:
6
,
max
:
20
,
message
:
"
请输入正确的验证码
"
,
trigger
:
"
blur
"
},
],
// 对密码进行校验
password
:
[
{
required
:
true
,
message
:
"
请输入密码
"
,
trigger
:
"
blur
"
},
{
min
:
6
,
max
:
20
,
message
:
"
请输入正确的密码
"
,
trigger
:
"
blur
"
},
],
// 对密码进行校验
rq_password
:
[
{
required
:
true
,
message
:
"
请输入确认密码
"
,
trigger
:
"
blur
"
},
{
validator
:
pwdCheck
,
trigger
:
"
blur
"
,
},
],
},
};
},
created
()
{
// this.$emit("getStatus", false);
},
methods
:
{
// 去注册
toLogin
()
{
this
.
$router
.
replace
({
name
:
"
index-login
"
});
},
},
created
()
{
// 改变密码显示状态
// this.$emit("getStatus", false);
changePwdStatus
()
{
this
.
isShowPwd
=
!
this
.
isShowPwd
;
},
},
methods
:
{
// 获取手机验证短信
// 去注册
getCode
()
{
toLogin
()
{
if
(
!
this
.
registerForm
.
phone
)
{
this
.
$router
.
replace
({
name
:
"
index-login
"
});
return
this
.
$message
.
error
(
"
请输入手机号
"
);
},
}
// 改变密码显示状态
// 倒计时60s
changePwdStatus
()
{
const
TIME_COUNT
=
60
;
this
.
isShowPwd
=
!
this
.
isShowPwd
;
if
(
!
this
.
timer
)
{
},
this
.
count
=
TIME_COUNT
;
// 获取手机验证短信
this
.
show
=
false
;
getCode
()
{
this
.
timer
=
setInterval
(()
=>
{
if
(
!
this
.
registerForm
.
phone
){
if
(
this
.
count
>
0
&&
this
.
count
<=
TIME_COUNT
)
{
return
this
.
$message
.
error
(
'
请输入手机号
'
);
this
.
count
--
;
}
}
else
{
// 倒计时60s
this
.
show
=
true
;
const
TIME_COUNT
=
60
;
clearInterval
(
this
.
timer
);
if
(
!
this
.
timer
)
{
this
.
timer
=
null
;
this
.
count
=
TIME_COUNT
;
this
.
show
=
false
;
this
.
timer
=
setInterval
(()
=>
{
if
(
this
.
count
>
0
&&
this
.
count
<=
TIME_COUNT
)
{
this
.
count
--
;
}
else
{
this
.
show
=
true
;
clearInterval
(
this
.
timer
);
this
.
timer
=
null
;
}
},
1000
);
}
// 接口获得验证码
registerCode
({
phone
:
this
.
registerForm
.
phone
,
}).
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
code
!=
200
)
{
return
this
.
$message
.
error
(
res
.
message
);
}
}
})
},
1000
);
},
}
// 接口获得验证码
registerCode
({
phone
:
this
.
registerForm
.
phone
,
}).
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
data
.
code
!=
200
)
{
return
this
.
$message
.
error
(
res
.
data
.
message
);
}
this
.
$message
.
success
(
res
.
data
.
message
);
});
},
// 表单验证
// 表单验证
submitForm
()
{
submitForm
()
{
this
.
$refs
[
"
registerFormRef
"
].
validate
((
valid
)
=>
{
if
(
!
valid
)
return
;
setAccountInfo
({
setAccountInfo
({
phone
:
this
.
registerForm
.
phone
,
phone
:
this
.
registerForm
.
phone
,
code
:
this
.
registerForm
.
code
,
code
:
this
.
registerForm
.
code
,
...
@@ -199,267 +204,269 @@
...
@@ -199,267 +204,269 @@
if
(
res
.
code
!=
200
)
{
if
(
res
.
code
!=
200
)
{
return
this
.
$message
.
error
(
res
.
message
);
return
this
.
$message
.
error
(
res
.
message
);
}
}
this
.
$message
.
success
(
res
.
message
);
// this.$router.replace({ name: "" });
// token存储
window
.
localStorage
.
setItem
(
"
index-token
"
,
res
.
token
);
this
.
$router
.
replace
({
name
:
"
index-signUp
"
});
});
});
}
}
);
},
},
};
},
};
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
// 内容区域
// 内容区域
.box_content
{
.box_content
{
.content
{
.content
{
max-width
:
1150px
;
max-width
:
1150px
;
margin
:
40px
auto
;
margin
:
40px
auto
;
padding
:
0
50px
;
padding
:
0
50px
;
overflow
:
auto
;
overflow
:
auto
;
.floatL
{
.floatL
{
float
:
left
;
float
:
left
;
width
:
670px
;
width
:
670px
;
h3
{
h3
{
font-size
:
20px
;
font-size
:
20px
;
color
:
#4c4c4c
;
color
:
#4c4c4c
;
font-weight
:
inherit
;
font-weight
:
inherit
;
padding-bottom
:
15px
;
padding-bottom
:
15px
;
margin-bottom
:
23px
;
margin-bottom
:
23px
;
border-bottom
:
4px
solid
#e0823d
;
border-bottom
:
4px
solid
#e0823d
;
}
}
ul
{
ul
{
li
{
li
{
height
:
40px
;
height
:
40px
;
line-height
:
40px
;
line-height
:
40px
;
border-bottom
:
1px
solid
#ddd
;
border-bottom
:
1px
solid
#ddd
;
a
{
a
{
display
:
inline-block
;
display
:
inline-block
;
width
:
100%
;
width
:
100%
;
font-size
:
16px
;
font-size
:
16px
;
color
:
#34538b
;
color
:
#34538b
;
text-decoration
:
none
;
text-decoration
:
none
;
&
:hover
{
&
:hover
{
text-decoration
:
underline
;
text-decoration
:
underline
;
}
}
}
}
}
}
}
}
.ContentLReg
{
.ContentLReg
{
height
:
60px
;
height
:
60px
;
color
:
#333333
;
color
:
#333333
;
font-size
:
14px
;
font-size
:
14px
;
span
{
span
{
cursor
:
pointer
;
cursor
:
pointer
;
color
:
#563279
;
color
:
#563279
;
font-weight
:
bold
;
font-weight
:
bold
;
&
:hover
{
&
:hover
{
text-decoration
:
underline
;
text-decoration
:
underline
;
}
}
}
}
}
}
.img_box
{
.img_box
{
width
:
100%
;
width
:
100%
;
height
:
156px
;
height
:
156px
;
text-align
:
center
;
text-align
:
center
;
img
{
img
{
&
:nth-child
(
1
)
{
&
:nth-child
(
1
)
{
margin-right
:
40px
;
margin-right
:
40px
;
}
}
}
}
}
}
}
}
.floatR
{
.floatR
{
float
:
right
;
float
:
right
;
width
:
374px
;
width
:
374px
;
ul
{
ul
{
margin-top
:
36px
;
margin-top
:
36px
;
margin-left
:
87px
;
margin-left
:
87px
;
li
{
li
{
font-size
:
16px
;
font-size
:
16px
;
width
:
100%
;
width
:
100%
;
height
:
45px
;
height
:
45px
;
line-height
:
45px
;
line-height
:
45px
;
padding-left
:
70px
;
padding-left
:
70px
;
margin-bottom
:
35px
;
margin-bottom
:
35px
;
// &:nth-child(1) {
// &:nth-child(1) {
// background: url("../../../assets/images/weidu.png") no-repeat 0px
// background: url("../../../assets/images/weidu.png") no-repeat 0px
// center;
// center;
// }
// }
// &:nth-child(2) {
// &:nth-child(2) {
// background: url("../../../assets/images/fangshi.png") no-repeat 0px
// background: url("../../../assets/images/fangshi.png") no-repeat 0px
// center;
// center;
// }
// }
// &:nth-child(3) {
// &:nth-child(3) {
// background: url("../../../assets/images/xingtai.png") no-repeat 0px
// background: url("../../../assets/images/xingtai.png") no-repeat 0px
// center;
// center;
// }
// }
}
}
}
}
}
}
}
}
}
}
// 注册输入
.container
{
width
:
440px
;
// height: 640px;
background
:
#ffffff
;
box-shadow
:
0px
1px
18px
0px
rgba
(
0
,
0
,
0
,
0
.06
);
border-radius
:
8px
;
position
:
absolute
;
top
:
50%
;
right
:
18%
;
transform
:
translate
(
0
,
-50%
);
padding
:
60px
;
margin-top
:
0
;
overflow
:
hidden
;
.title
{
margin
:
19px
0
6px
0
;
width
:
132px
;
height
:
20px
;
font-size
:
22px
;
font-weight
:
500
;
color
:
#60194a
;
line-height
:
20px
;
}
// 注册输入
.line
{
.container
{
width
:
48px
;
width
:
440px
;
height
:
3px
;
// height: 640px;
background
:
#60194a
;
background
:
#ffffff
;
border-radius
:
2px
;
box-shadow
:
0px
1px
18px
0px
rgba
(
0
,
0
,
0
,
0
.06
);
}
border-radius
:
8px
;
position
:
absolute
;
top
:
50%
;
right
:
18%
;
transform
:
translate
(
0
,
-50%
);
padding
:
60px
;
margin-top
:
0
;
overflow
:
hidden
;
.title
{
margin
:
19px
0
6px
0
;
width
:
132px
;
height
:
20px
;
font-size
:
22px
;
font-weight
:
500
;
color
:
#60194a
;
line-height
:
20px
;
}
.line
{
::v-deep
.el-form
{
width
:
48px
;
margin-top
:
60px
;
height
:
3px
;
background
:
#60194a
;
border-radius
:
2px
;
}
::v-deep
.el-form
{
.el-form-item
{
margin-top
:
60px
;
position
:
relative
;
margin-bottom
:
30px
;
.el-form-item
{
&
:last-child
{
position
:
relative
;
margin
:
0
;
margin-bottom
:
30px
;
}
&
:last-child
{
.el-form-item__content
{
margin
:
0
;
position
:
relative
;
}
.el-form-item__content
{
.phoneCode
{
position
:
relative
;
position
:
absolute
;
z-index
:
999
;
.phoneCode
{
top
:
50%
;
position
:
absolute
;
right
:
25px
;
z-index
:
999
;
transform
:
translate
(
0
,
-50%
);
top
:
50%
;
cursor
:
pointer
;
right
:
25px
;
transform
:
translate
(
0
,
-50%
);
cursor
:
pointer
;
.code
{
font-size
:
14px
;
font-weight
:
600
;
color
:
#60194a
;
}
}
img
.img_l
{
.code
{
position
:
absolute
;
font-size
:
14px
;
left
:
25px
;
font-weight
:
600
;
top
:
50%
;
color
:
#60194a
;
transform
:
translate
(
-50%
,
-50%
);
z-index
:
1000
;
}
}
}
img
.img_r
{
img
.img_l
{
position
:
absolute
;
position
:
absolute
;
right
:
1
5px
;
left
:
2
5px
;
top
:
50%
;
top
:
50%
;
transform
:
translate
(
0
,
-50%
);
transform
:
translate
(
-50%
,
-50%
);
z-index
:
1000
;
z-index
:
1000
;
}
}
.el-input__inner
{
img
.img_r
{
height
:
50px
;
position
:
absolute
;
line-height
:
50px
;
right
:
15px
;
padding
:
0
10px
0
50px
;
top
:
50%
;
border-radius
:
0
;
transform
:
translate
(
0
,
-50%
);
color
:
#4d4d4d
;
z-index
:
1000
;
border
:
0
;
}
border-bottom
:
2px
solid
#d9d9d9
;
&
:focus
{
border-bottom-color
:
#563279
;
}
}
.el-form-item__error
{
.el-input__inner
{
color
:
#e0823d
;
height
:
50px
;
line-height
:
50px
;
padding
:
0
10px
0
50px
;
border-radius
:
0
;
color
:
#4d4d4d
;
border
:
0
;
border-bottom
:
2px
solid
#d9d9d9
;
&
:focus
{
border-bottom-color
:
#563279
;
}
}
}
.el-button
{
.el-form-item__error
{
width
:
100%
;
color
:
#e0823d
;
height
:
60px
;
}
background
:
#60194a
;
border-radius
:
4px
;
opacity
:
0
.8
;
line-height
:
50px
;
text-align
:
center
;
color
:
#fff
;
font-size
:
16px
;
padding
:
0
;
margin
:
30px
0
0
0
;
}
.el-button
{
width
:
100%
;
height
:
60px
;
background
:
#60194a
;
border-radius
:
4px
;
opacity
:
0
.8
;
line-height
:
50px
;
text-align
:
center
;
color
:
#fff
;
font-size
:
16px
;
padding
:
0
;
margin
:
30px
0
0
0
;
}
}
}
}
}
.box
{
.box
{
height
:
18px
;
height
:
18px
;
display
:
block
;
display
:
block
;
.fr
{
// float: left;
text-align
:
center
;
height
:
18px
;
line-height
:
18px
;
color
:
#999999
;
margin-top
:
-10px
;
cursor
:
pointer
;
&
:hover
{
.fr
{
color
:
#563279
;
// float: left;
text-decoration
:
underline
;
text-align
:
center
;
}
height
:
18px
;
line-height
:
18px
;
color
:
#999999
;
margin-top
:
-10px
;
cursor
:
pointer
;
&
:hover
{
color
:
#563279
;
text-decoration
:
underline
;
}
}
}
}
}
}
}
}
}
@media
screen
and
(
max-width
:
1601px
)
{
@media
screen
and
(
max-width
:
1601px
)
{
.container
{
.container
{
right
:
18%
;
right
:
18%
;
}
}
}
}
@media
screen
and
(
max-width
:
1501px
)
{
@media
screen
and
(
max-width
:
1501px
)
{
.container
{
.container
{
right
:
16%
;
right
:
16%
;
}
}
}
}
@media
screen
and
(
max-width
:
1401px
)
{
@media
screen
and
(
max-width
:
1401px
)
{
.container
{
.container
{
right
:
14%
;
right
:
14%
;
}
}
}
}
</
style
>
</
style
>
src/views/index/login/Reset.vue
View file @
2a9d7b5d
...
@@ -2,80 +2,75 @@
...
@@ -2,80 +2,75 @@
<div>
<div>
<div
style=
"border: none"
>
<div
style=
"border: none"
>
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"title"
>
重置
密码
</div>
<div
class=
"title"
>
忘记
密码
</div>
<div
class=
"line"
></div>
<div
class=
"line"
></div>
<el-form
<el-form
:model=
"
login
Form"
:model=
"
reset
Form"
:rules=
"
loginForm
Rules"
:rules=
"
reset
Rules"
ref=
"
login
FormRef"
ref=
"
reset
FormRef"
class=
"demo-r
ule
Form"
class=
"demo-r
eset
Form"
>
>
<el-form-item
prop=
"username"
>
<el-form-item
prop=
"phone"
>
<img
<img
class=
"img_l"
src=
"@/assets/img/reset/username.png"
alt=
""
/>
class=
"img_l"
src=
"../../../assets/img/reset/username.png"
alt=
""
/>
<el-input
<el-input
v-model=
"
loginForm.usernam
e"
v-model=
"
resetForm.phon
e"
placeholder=
"请输入手机号"
placeholder=
"请输入手机号"
maxlength=
"20"
maxlength=
"20"
autocomplete=
"off"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"username"
>
<el-form-item
prop=
"code"
>
<img
<img
class=
"img_l"
src=
"@/assets/img/reset/code.png"
alt=
""
/>
class=
"img_l"
src=
"../../../assets/img/reset/code.png"
alt=
""
/>
<el-input
<el-input
v-model=
"
loginForm.usernam
e"
v-model=
"
resetForm.cod
e"
placeholder=
"请输入短信验证码"
placeholder=
"请输入短信验证码"
maxlength=
"20"
maxlength=
"20"
autocomplete=
"off"
></el-input>
></el-input>
<!-- 短信验证码 -->
<div
class=
"phoneCode"
>
<span
class=
"code"
v-show=
"show"
@
click=
"getCode"
>
获取验证码
</span
>
<span
v-show=
"!show"
class=
"count"
>
{{
count
}}
s
</span>
</div>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"password"
>
<el-form-item
prop=
"password"
>
<img
<img
class=
"img_l"
src=
"@/assets/img/reset/password.png"
alt=
""
/>
class=
"img_l"
src=
"../../../assets/img/reset//password.png"
alt=
""
/>
<el-input
<el-input
v-model=
"
login
Form.password"
v-model=
"
reset
Form.password"
:type=
"isShowPwd ? 'password' : 'text'"
:type=
"isShowPwd ? 'password' : 'text'"
maxlength=
"20"
maxlength=
"20"
placeholder=
"设置密码:6-12位字符,包含字母或数字"
placeholder=
"设置密码:6-12位字符,包含字母或数字"
:autocomplete=
"isShowPwd ? 'new-password' : 'off'"
></el-input>
></el-input>
<img
<img
@
click=
"changePwdStatus()"
@
click=
"changePwdStatus()"
v-if=
"!isShowPwd"
v-if=
"!isShowPwd"
class=
"img_r"
class=
"img_r"
src=
"
../../../assets/img/reset/
/eye01.png"
src=
"
@/assets/img/reset
/eye01.png"
alt=
""
alt=
""
/>
/>
<img
<img
@
click=
"changePwdStatus()"
@
click=
"changePwdStatus()"
v-if=
"isShowPwd"
v-if=
"isShowPwd"
class=
"img_r"
class=
"img_r"
src=
"
../../..
/assets/img/reset/eye01.png"
src=
"
@
/assets/img/reset/eye01.png"
alt=
""
alt=
""
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"password"
>
<el-form-item
prop=
"rq_password"
>
<img
<img
class=
"img_l"
src=
"@/assets/img/reset/password.png"
alt=
""
/>
class=
"img_l"
src=
"../../../assets/img/reset/password.png"
alt=
""
/>
<el-input
<el-input
v-model=
"
loginForm.username
"
v-model=
"
resetForm.rq_password
"
placeholder=
"请再次输入登录密码"
placeholder=
"请再次输入
新的
登录密码"
maxlength=
"20"
maxlength=
"20"
autocomplete=
"off"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
style=
"margin: 40px 0 0 0"
></el-form-item>
<el-form-item
style=
"margin: 40px 0 0 0"
></el-form-item>
<el-form-item>
<el-form-item>
<el-button
@
click=
"submitForm()"
>
重置密码
</el-button>
<el-button
@
click=
"submitForm()"
>
重置密码
</el-button>
</el-form-item>
</el-form-item>
<div
class=
"box"
>
<div
class=
"box"
>
<div
class=
"fr"
@
click=
"toLogin()"
>
已有账号?马上登录
</div>
<div
class=
"fr"
@
click=
"toLogin()"
>
已有账号?马上登录
</div>
...
@@ -88,49 +83,74 @@
...
@@ -88,49 +83,74 @@
<
script
>
<
script
>
/* eslint-disable */
/* eslint-disable */
// import { authMixin } from 'mixins/admin/auth'
// 请求接口
import
{
login
}
from
"
../../../request/index/login
"
;
import
{
passwordCode
}
from
"
r/index/register
"
;
import
{
changePassCode
}
from
"
r/index/login
"
;
import
{
mobileCheck
}
from
"
@/common/utils.js
"
;
export
default
{
export
default
{
name
:
"
index-reset
"
,
name
:
"
index-reset
"
,
data
()
{
data
()
{
const
pwdCheck
=
async
(
rule
,
value
,
callback
)
=>
{
if
(
value
!==
this
.
resetForm
.
password
)
{
callback
(
new
Error
(
"
两次输入的密码不一致
"
));
}
else
{
callback
();
}
};
return
{
return
{
// 手机验证短信
show
:
true
,
count
:
""
,
timer
:
null
,
isShowPwd
:
true
,
// 控制密码显示隐藏
isShowPwd
:
true
,
// 控制密码显示隐藏
loginForm
:
{
resetForm
:
{
username
:
""
,
phone
:
""
,
code
:
""
,
password
:
""
,
password
:
""
,
rq_password
:
""
,
},
},
// 表单验证规则对象
// 表单验证规则对象
loginFormRules
:
{
resetRules
:
{
// 对用户名进行校验
// 对手机号进行校验
username
:
[
phone
:
[
{
required
:
true
,
message
:
"
请输入用户名
"
,
trigger
:
"
blur
"
},
{
required
:
true
,
message
:
"
请输入手机号
"
,
trigger
:
"
blur
"
},
{
min
:
4
,
max
:
20
,
message
:
"
请输入正确的用户名
"
,
trigger
:
"
blur
"
},
{
validator
:
function
(
rule
,
value
,
callback
)
{
if
(
mobileCheck
(
value
)
===
false
)
{
callback
(
new
Error
(
"
请输入正确的手机号
"
));
}
else
{
callback
();
}
},
trigger
:
"
blur
"
,
},
],
// 对验证码进行校验
code
:
[
{
required
:
true
,
message
:
"
请输入验证码
"
,
trigger
:
"
blur
"
},
{
min
:
6
,
max
:
20
,
message
:
"
请输入正确的验证码
"
,
trigger
:
"
blur
"
},
],
],
// 对密码进行校验
// 对密码进行校验
password
:
[
password
:
[
{
required
:
true
,
message
:
"
请输入密码
"
,
trigger
:
"
blur
"
},
{
required
:
true
,
message
:
"
请输入密码
"
,
trigger
:
"
blur
"
},
{
min
:
6
,
max
:
20
,
message
:
"
请输入正确的密码
"
,
trigger
:
"
blur
"
},
{
min
:
6
,
max
:
20
,
message
:
"
请输入正确的密码
"
,
trigger
:
"
blur
"
},
],
],
// 对密码进行校验
rq_password
:
[
{
required
:
true
,
message
:
"
请输入确认密码
"
,
trigger
:
"
blur
"
},
{
validator
:
pwdCheck
,
trigger
:
"
blur
"
,
},
],
},
},
dialogFormFu
:
{
title
:
""
,
message
:
""
,
},
dialogVisibleFu
:
false
,
};
};
},
},
created
()
{
created
()
{
this
.
$emit
(
"
getStatus
"
,
false
);
},
},
methods
:
{
methods
:
{
// 子组件触发,关闭弹框
closeDialog
(
value
,
type
)
{
this
.
dialogVisibleFu
=
value
;
if
(
type
)
{
this
.
$router
.
replace
({
name
:
"
StepOne
"
});
}
},
// 去注册
// 去注册
toLogin
()
{
toLogin
()
{
this
.
$router
.
replace
({
name
:
"
index-login
"
});
this
.
$router
.
replace
({
name
:
"
index-login
"
});
...
@@ -139,60 +159,57 @@ export default {
...
@@ -139,60 +159,57 @@ export default {
changePwdStatus
()
{
changePwdStatus
()
{
this
.
isShowPwd
=
!
this
.
isShowPwd
;
this
.
isShowPwd
=
!
this
.
isShowPwd
;
},
},
// 获取手机验证短信
getCode
()
{
if
(
!
this
.
resetForm
.
phone
)
{
return
this
.
$message
.
error
(
"
请输入手机号
"
);
}
// 倒计时60s
const
TIME_COUNT
=
60
;
if
(
!
this
.
timer
)
{
this
.
count
=
TIME_COUNT
;
this
.
show
=
false
;
this
.
timer
=
setInterval
(()
=>
{
if
(
this
.
count
>
0
&&
this
.
count
<=
TIME_COUNT
)
{
this
.
count
--
;
}
else
{
this
.
show
=
true
;
clearInterval
(
this
.
timer
);
this
.
timer
=
null
;
}
},
1000
);
}
// 接口获得验证码
passwordCode
({
phone
:
this
.
resetForm
.
phone
,
}).
then
((
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
data
.
code
!=
200
)
{
return
this
.
$message
.
error
(
res
.
data
.
message
);
}
this
.
$message
.
success
(
res
.
data
.
message
);
});
},
// 表单验证
// 表单验证
submitForm
()
{
submitForm
()
{
this
.
$refs
.
loginFormRef
.
validate
(
async
(
valid
)
=>
{
this
.
$refs
[
"
resetFormRef
"
].
validate
((
valid
)
=>
{
// 验证用户名和密码是否符合规定
if
(
!
valid
)
return
;
if
(
!
valid
)
return
;
changePassCode
({
// 发送请求的操作
phone
:
this
.
resetForm
.
phone
,
const
{
data
:
res
}
=
await
login
(
this
.
loginForm
);
code
:
this
.
resetForm
.
code
,
console
.
log
(
res
,
"
返回用户注册数据
"
);
password
:
this
.
resetForm
.
password
,
// 根据返回的状态码做想关的判断
rq_password
:
this
.
resetForm
.
rq_password
,
if
(
res
.
code
!==
200
)
{
}).
then
((
res
)
=>
{
return
this
.
$message
.
error
(
res
.
message
);
console
.
log
(
res
);
}
if
(
res
.
data
.
code
!=
200
)
{
return
this
.
$message
.
error
(
res
.
data
.
message
);
// 判断用户注册是否填写信息完整
const
applicationstatus
=
parseInt
(
res
.
applicationstatus
);
const
can_skip
=
parseInt
(
res
.
can_skip
);
window
.
localStorage
.
setItem
(
"
applicationstatus
"
,
res
.
applicationstatus
);
window
.
localStorage
.
setItem
(
"
can_skip
"
,
res
.
can_skip
);
window
.
localStorage
.
setItem
(
"
is_check_id_card
"
,
res
.
is_check_id_card
);
console
.
log
(
!
can_skip
);
if
(
!
can_skip
)
{
if
(
applicationstatus
==
0
)
{
window
.
localStorage
.
setItem
(
"
sfzNum
"
,
res
.
sfzNum
);
this
.
$router
.
replace
({
name
:
"
StepOne
"
,
query
:
{
applicationstatus
:
"
0
"
,
data
:
res
},
});
return
;
}
else
if
(
applicationstatus
==
3
||
applicationstatus
==
4
||
applicationstatus
==
5
||
applicationstatus
==
6
)
{
window
.
localStorage
.
setItem
(
"
index-token
"
,
res
.
token
);
this
.
$store
.
state
.
token
=
res
.
token
;
window
.
localStorage
.
setItem
(
"
student_id
"
,
res
.
student_id
);
window
.
localStorage
.
setItem
(
"
sfzNum
"
,
res
.
sfzNum
);
window
.
localStorage
.
setItem
(
"
username
"
,
res
.
username
);
if
(
res
.
is_check_id_card
!=
1
)
{
this
.
$router
.
replace
({
name
:
"
StepTwo
"
});
}
else
{
this
.
$router
.
replace
({
name
:
"
StepThree
"
});
}
return
;
}
}
}
this
.
$message
.
success
(
res
.
data
.
message
);
this
.
$store
.
state
.
token
=
res
.
token
;
// token存储
window
.
localStorage
.
setItem
(
"
index-token
"
,
res
.
token
);
window
.
localStorage
.
setItem
(
"
index-token
"
,
res
.
token
);
window
.
localStorage
.
setItem
(
"
student_id
"
,
res
.
student_id
);
this
.
$router
.
replace
({
name
:
"
index-login
"
});
window
.
localStorage
.
setItem
(
"
sfzNum
"
,
res
.
sfzNum
);
});
window
.
localStorage
.
setItem
(
"
username
"
,
res
.
username
);
this
.
$router
.
replace
({
name
:
"
examlist
"
});
});
});
},
},
},
},
...
@@ -207,9 +224,11 @@ export default {
...
@@ -207,9 +224,11 @@ export default {
margin
:
40px
auto
;
margin
:
40px
auto
;
padding
:
0
50px
;
padding
:
0
50px
;
overflow
:
auto
;
overflow
:
auto
;
.floatL
{
.floatL
{
float
:
left
;
float
:
left
;
width
:
670px
;
width
:
670px
;
h3
{
h3
{
font-size
:
20px
;
font-size
:
20px
;
color
:
#4c4c4c
;
color
:
#4c4c4c
;
...
@@ -218,40 +237,48 @@ export default {
...
@@ -218,40 +237,48 @@ export default {
margin-bottom
:
23px
;
margin-bottom
:
23px
;
border-bottom
:
4px
solid
#e0823d
;
border-bottom
:
4px
solid
#e0823d
;
}
}
ul
{
ul
{
li
{
li
{
height
:
40px
;
height
:
40px
;
line-height
:
40px
;
line-height
:
40px
;
border-bottom
:
1px
solid
#ddd
;
border-bottom
:
1px
solid
#ddd
;
a
{
a
{
display
:
inline-block
;
display
:
inline-block
;
width
:
100%
;
width
:
100%
;
font-size
:
16px
;
font-size
:
16px
;
color
:
#34538b
;
color
:
#34538b
;
text-decoration
:
none
;
text-decoration
:
none
;
&
:hover
{
&
:hover
{
text-decoration
:
underline
;
text-decoration
:
underline
;
}
}
}
}
}
}
}
}
.ContentLReg
{
.ContentLReg
{
height
:
60px
;
height
:
60px
;
color
:
#333333
;
color
:
#333333
;
font-size
:
14px
;
font-size
:
14px
;
span
{
span
{
cursor
:
pointer
;
cursor
:
pointer
;
color
:
#563279
;
color
:
#563279
;
font-weight
:
bold
;
font-weight
:
bold
;
&
:hover
{
&
:hover
{
text-decoration
:
underline
;
text-decoration
:
underline
;
}
}
}
}
}
}
.img_box
{
.img_box
{
width
:
100%
;
width
:
100%
;
height
:
156px
;
height
:
156px
;
text-align
:
center
;
text-align
:
center
;
img
{
img
{
&
:nth-child
(
1
)
{
&
:nth-child
(
1
)
{
margin-right
:
40px
;
margin-right
:
40px
;
...
@@ -259,12 +286,15 @@ export default {
...
@@ -259,12 +286,15 @@ export default {
}
}
}
}
}
}
.floatR
{
.floatR
{
float
:
right
;
float
:
right
;
width
:
374px
;
width
:
374px
;
ul
{
ul
{
margin-top
:
36px
;
margin-top
:
36px
;
margin-left
:
87px
;
margin-left
:
87px
;
li
{
li
{
font-size
:
16px
;
font-size
:
16px
;
width
:
100%
;
width
:
100%
;
...
@@ -289,6 +319,8 @@ export default {
...
@@ -289,6 +319,8 @@ export default {
}
}
}
}
}
}
// 注册输入
.container
{
.container
{
width
:
440px
;
width
:
440px
;
// height: 640px;
// height: 640px;
...
@@ -298,12 +330,11 @@ export default {
...
@@ -298,12 +330,11 @@ export default {
position
:
absolute
;
position
:
absolute
;
top
:
50%
;
top
:
50%
;
right
:
18%
;
right
:
18%
;
// left: 10%;
transform
:
translate
(
0
,
-50%
);
transform
:
translate
(
0
,
-50%
);
padding
:
60px
;
padding
:
60px
;
margin-top
:
0
;
margin-top
:
0
;
// background: url("../../../assets/images/loginbgp.png") no-repeat 0 center;
overflow
:
hidden
;
overflow
:
hidden
;
.title
{
.title
{
margin
:
19px
0
6px
0
;
margin
:
19px
0
6px
0
;
width
:
132px
;
width
:
132px
;
...
@@ -313,69 +344,97 @@ export default {
...
@@ -313,69 +344,97 @@ export default {
color
:
#60194a
;
color
:
#60194a
;
line-height
:
20px
;
line-height
:
20px
;
}
}
.line
{
.line
{
width
:
48px
;
width
:
48px
;
height
:
3px
;
height
:
3px
;
background
:
#60194a
;
background
:
#60194a
;
border-radius
:
2px
;
border-radius
:
2px
;
}
}
::v-deep
.el-input__inner
{
border
:
1px
solid
#ffff
;
::v-deep
.el-form
{
}
.el-form
{
margin-top
:
60px
;
margin-top
:
60px
;
.el-form-item
{
.el-form-item
{
position
:
relative
;
position
:
relative
;
margin-bottom
:
30px
;
margin-bottom
:
30px
;
&
:last-child
{
&
:last-child
{
margin
:
0
;
margin
:
0
;
}
}
img
.img_l
{
.el-form-item__content
{
position
:
absolute
;
position
:
relative
;
left
:
25px
;
top
:
50%
;
.phoneCode
{
transform
:
translate
(
-50%
,
-50%
);
position
:
absolute
;
z-index
:
1000
;
z-index
:
999
;
}
top
:
50%
;
img
.img_r
{
right
:
25px
;
position
:
absolute
;
transform
:
translate
(
0
,
-50%
);
right
:
15px
;
cursor
:
pointer
;
top
:
50%
;
transform
:
translate
(
0
,
-50%
);
.code
{
z-index
:
1000
;
font-size
:
14px
;
}
font-weight
:
600
;
::v-deep
.el-input__inner
{
color
:
#60194a
;
height
:
50px
;
}
line-height
:
50px
;
}
padding
:
0
10px
0
50px
;
border-radius
:
0
;
img
.img_l
{
color
:
#4d4d4d
;
position
:
absolute
;
border-bottom
:
2px
solid
#d9d9d9
;
left
:
25px
;
&
:focus
{
top
:
50%
;
border-bottom-color
:
#563279
;
transform
:
translate
(
-50%
,
-50%
);
z-index
:
1000
;
}
img
.img_r
{
position
:
absolute
;
right
:
15px
;
top
:
50%
;
transform
:
translate
(
0
,
-50%
);
z-index
:
1000
;
}
.el-input__inner
{
height
:
50px
;
line-height
:
50px
;
padding
:
0
10px
0
50px
;
border-radius
:
0
;
color
:
#4d4d4d
;
border
:
0
;
border-bottom
:
2px
solid
#d9d9d9
;
&
:focus
{
border-bottom-color
:
#563279
;
}
}
.el-form-item__error
{
color
:
#e0823d
;
}
.el-button
{
width
:
100%
;
height
:
60px
;
background
:
#60194a
;
border-radius
:
4px
;
opacity
:
0
.8
;
line-height
:
50px
;
text-align
:
center
;
color
:
#fff
;
font-size
:
16px
;
padding
:
0
;
margin
:
30px
0
0
0
;
}
}
}
::v-deep
.el-form-item__error
{
color
:
#e0823d
;
}
.el-button
{
width
:
100%
;
height
:
60px
;
background
:
#60194a
;
border-radius
:
4px
;
opacity
:
0
.8
;
line-height
:
50px
;
text-align
:
center
;
color
:
#fff
;
font-size
:
16px
;
padding
:
0
;
margin
:
30px
0
0
0
;
}
}
}
}
.box
{
.box
{
height
:
18px
;
height
:
18px
;
display
:
block
;
display
:
block
;
.fr
{
.fr
{
// float: left;
// float: left;
text-align
:
center
;
text-align
:
center
;
...
@@ -384,6 +443,7 @@ export default {
...
@@ -384,6 +443,7 @@ export default {
color
:
#999999
;
color
:
#999999
;
margin-top
:
-10px
;
margin-top
:
-10px
;
cursor
:
pointer
;
cursor
:
pointer
;
&
:hover
{
&
:hover
{
color
:
#563279
;
color
:
#563279
;
text-decoration
:
underline
;
text-decoration
:
underline
;
...
@@ -392,16 +452,19 @@ export default {
...
@@ -392,16 +452,19 @@ export default {
}
}
}
}
}
}
@media
screen
and
(
max-width
:
1601px
)
{
@media
screen
and
(
max-width
:
1601px
)
{
.container
{
.container
{
right
:
18%
;
right
:
18%
;
}
}
}
}
@media
screen
and
(
max-width
:
1501px
)
{
@media
screen
and
(
max-width
:
1501px
)
{
.container
{
.container
{
right
:
16%
;
right
:
16%
;
}
}
}
}
@media
screen
and
(
max-width
:
1401px
)
{
@media
screen
and
(
max-width
:
1401px
)
{
.container
{
.container
{
right
:
14%
;
right
:
14%
;
...
...
vue.config.js
View file @
2a9d7b5d
...
@@ -23,8 +23,8 @@ module.exports = {
...
@@ -23,8 +23,8 @@ module.exports = {
// host: 'localhost',
// host: 'localhost',
// port: 8080, // 端口号
// port: 8080, // 端口号
// https: true, // https:{type:Boolean}
// https: true, // https:{type:Boolean}
open
:
true
,
// 配置自动启动浏览器
//
open: true, // 配置自动启动浏览器
hotOnly
:
true
,
// 热更新
//
hotOnly: true, // 热更新
// // proxy: {
// // proxy: {
// // "/api": {
// // "/api": {
// // target: "http://127.0.0.1:8080/",
// // target: "http://127.0.0.1:8080/",
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment