Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴迪
gs1
Commits
0de613ab
Commit
0de613ab
authored
Jan 28, 2024
by
Lyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录修改
parent
dd003837
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
11 deletions
+58
-11
changePass.vue
src/views/MyManage/UnVerify/changePass.vue
+10
-4
login.vue
src/views/User/login.vue
+48
-7
No files found.
src/views/MyManage/UnVerify/changePass.vue
View file @
0de613ab
...
...
@@ -13,7 +13,7 @@
prop=
'oldPass'
type=
'password'
:rules=
"[
{required: true,message: '不能为空',},
{ pattern: pwdPattern, message: '密码
需要6~16位数字+字母组合
',},
{ pattern: pwdPattern, message: '密码
长度8-20 位字符,包括数字、大、小写字母、特殊字符中的至少2种
',},
{ validator:validatePass,}]">
<el-input
type=
'password'
placeholder=
"请输入原密码"
v-model=
'form.oldPass'
></el-input>
</el-form-item>
...
...
@@ -21,7 +21,7 @@
prop=
'newPass'
type=
'password'
:rules=
"[
{required: true,message: '不能为空',},
{ pattern: pwdPattern, message: '密码
需要6~16位数字+字母组合
',},
{ pattern: pwdPattern, message: '密码
长度8-20 位字符,包括数字、大、小写字母、特殊字符中的至少2种
',},
{ validator:validatePass,}]">
<el-input
type=
'password'
placeholder=
"请输入新密码"
v-model=
'form.newPass'
></el-input>
</el-form-item>
...
...
@@ -60,7 +60,10 @@ export default {
newPass
:
''
,
affirmPass
:
''
},
pwdPattern
:
/^
(?=
.*
[
a-zA-Z
])(?=
.*
[
0-9
])[
A-Za-z0-9
]{6,16}
$/
,
// pwdPattern: /^(?=.*[a-zA-Z])(?=.*[0-9])[A-Za-z0-9]{6,16}$/,
pwdPattern
:
/^
(?![\d]
+$
)(?![
a-z
]
+$
)(?![
A-Z
]
+$
)(?![
@$!%*#?&
]
+$
)[\d
a-zA-z@$!%*#?&
]{8,20}
$/
,
}
},
methods
:
{
...
...
@@ -135,7 +138,7 @@ export default {
.content-from
{
padding
:
0
40px
;
width
:
70%
;
//
width
:
70%
;
.content-from-title{
font-size
:
14px
;
line-height
:
20px
;
...
...
@@ -158,6 +161,9 @@ export default {
/
deep
/
.el-input
{
font-size
:
13px
;
}
/
deep
/
.el-input__inner
{
width
:
70%
!important
;
}
.smallselect
{
...
...
src/views/User/login.vue
View file @
0de613ab
<
template
>
<EntryCard
title=
"网站用户登录"
>
<div
class=
"login"
>
<div
class=
"entry-login-title"
>
用户名登录
</div>
<div
class=
"entry-login-title"
>
<span
:class=
"
{'active':isCardNumberLogin==1}" @click="changeType(1)">条码卡登录
</span>
|
<span
:class=
"
{'active':isCardNumberLogin==0}" @click="changeType(0)">账户登录
</span>
</div>
<el-form
:model=
"userForm"
status-icon
ref=
"userLoginFormRef"
>
<el-form-item
prop=
"userName"
:rules=
"[
{ required: true, message:
'请输入用户名/条码卡号'
, trigger: 'blur' }]"
:rules=
"[
{ required: true, message:
placeholder
, trigger: 'blur' }]"
>
<el-input
v-model=
"userForm.userName"
placeholder=
"请输入用户名/条码卡号
"
></el-input>
:placeholder=
"placeholder
"
></el-input>
</el-form-item>
<el-form-item
prop=
"passWord"
...
...
@@ -155,6 +159,7 @@
<
script
>
import
EntryCard
from
'./entry-card.vue'
import
{
getUUID
}
from
"@/utils/utils"
;
import
tmggVue
from
'../Business/copms/tmgg.vue'
;
export
default
{
name
:
"login"
,
...
...
@@ -176,13 +181,26 @@ export default {
uuid
:
''
,
errorMsg
:
''
,
isAgreeShow
:
false
,
isCardNumberLogin
:
1
,
placeholder
:
'请输入条码卡号'
}
},
created
()
{
this
.
getCaptcha
();
},
methods
:
{
changeType
(
type
){
this
.
userForm
.
userName
=
''
this
.
userForm
.
passWord
=
''
this
.
userForm
.
captcha
=
''
this
.
isCardNumberLogin
=
type
if
(
type
==
1
){
this
.
placeholder
=
'请输入条码卡号'
}
else
{
this
.
placeholder
=
'请输入用户名'
}
},
// 点击注册弹出协议
registerAgreement
(){
this
.
$router
.
push
({
name
:
'register'
,
query
:{
isAgree
:
1
}})
...
...
@@ -221,7 +239,10 @@ export default {
// }
this
.
$api
.
user
.
login
({
...
this
.
userForm
,
uuid
:
this
.
uuid
uuid
:
this
.
uuid
,
isCardNumberLogin
:
this
.
isCardNumberLogin
}).
then
(
async
res
=>
{
console
.
log
(
res
,
!
res
.
success
)
if
(
!
res
.
success
)
{
...
...
@@ -229,6 +250,7 @@ export default {
this
.
showUserLoginError
=
true
;
this
.
getCaptcha
();
}
else
{
localStorage
.
setItem
(
'TOKEN'
,
res
.
data
.
token
)
const
memberInfo
=
await
this
.
$api
.
myManage
.
memberInfo
({
id
:
res
.
data
.
id
})
console
.
log
(
memberInfo
)
...
...
@@ -247,6 +269,7 @@ export default {
// localStorage.setItem('gs-user', JSON.stringify({type: 'adminBranch'}))
// this.$router.push({path: '/MyManage/admin/check'})
// }
// userType 1.系统成员 2.手机用户 3.实名认证企业 4.网站用户
if
(
loginInfo
.
userType
===
1
){
localStorage
.
setItem
(
'gs-user'
,
JSON
.
stringify
({
type
:
1
}))
...
...
@@ -261,6 +284,11 @@ export default {
this
.
$router
.
push
({
path
:
'/MyManage/UnVerify/index'
})
localStorage
.
setItem
(
'gs-user'
,
JSON
.
stringify
({
type
:
4
}))
}
if
(
res
.
data
.
isNeedUpdatePassword
==
1
){
// 需要强制修改密码
this
.
$message
.
error
(
'密码不符合规范,请修改密码!'
)
this
.
$router
.
push
({
name
:
'changePass'
})
}
}
})
...
...
@@ -283,8 +311,21 @@ export default {
font-size
:
16px
;
font-weight
:
500
;
color
:
$
theme-color1
;
margin-bottom
:
44px
;
text-align
:
center
;
margin-bottom
:
34px
;
//
text-align
:
center
;
display
:
flex
;
justify-content
:
space-evenly
;
color
:
#999999
;
span{
cursor
:
pointer
;
padding-bottom
:
10px
;
}
.active
{
color
:
$
theme-color1
;
font-weight
:
600
;
border-bottom
:
2px
solid
;
}
}
.el-form
{
...
...
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