Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
S
shop-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
王天霸
shop-new
Commits
aa92edf3
提交
aa92edf3
authored
6月 22, 2021
作者:
huaxinzhu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
设置
上级
1ba01a00
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
155 行增加
和
81 行删除
+155
-81
index.js
src/api/module/settings/index.js
+20
-10
setpsd.vue
src/views/system/settings/setpsd.vue
+135
-71
没有找到文件。
src/api/module/settings/index.js
浏览文件 @
aa92edf3
...
@@ -9,18 +9,28 @@ export function changeTelphone(data) {
...
@@ -9,18 +9,28 @@ export function changeTelphone(data) {
})
})
}
}
// 设置登录密码
export
function
changeLoginPassword
(
data
)
{
return
request
({
url
:
'/local/seller/setPass'
,
method
:
'post'
,
data
:
data
})
}
// 设置支付密码
export
function
changePayPassword
(
data
)
{
return
request
({
url
:
'/local/seller/setPayPass'
,
method
:
'post'
,
data
:
data
})
}
// 获取验证码
export
function
getTelphoneCode
(
id
)
{
// 获取手机验证码
export
function
getTelphoneCode
(
query
)
{
return
request
({
return
request
({
url
:
'/local/seller/sendCodeMobile'
,
url
:
'/local/seller/sendCodeMobile?mobile='
+
id
,
method
:
'get'
,
method
:
'get'
params
:
query
})
})
}
}
src/views/system/settings/setpsd.vue
浏览文件 @
aa92edf3
...
@@ -34,16 +34,16 @@
...
@@ -34,16 +34,16 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</el-card>
</el-card>
<!--修改账号 对话框-->
<!--修改
账号 对话框-->
<el-dialog
title=
"修改登录账号"
:visible
.
sync=
"isAccount"
width=
"50%"
>
<el-dialog
title=
"修改登录账号"
:visible
.
sync=
"isAccount"
width=
"50%"
>
<el-form
:model=
"accountForm"
:rules=
"accountRules"
ref=
"accountForm"
label-width=
"200px"
size=
"small"
>
<el-form
:model=
"accountForm"
:rules=
"accountRules"
ref=
"accountForm"
label-width=
"200px"
size=
"small"
>
<el-form-item
label=
"登录密码:"
prop=
"
loginps
d"
>
<el-form-item
label=
"登录密码:"
prop=
"
passwor
d"
>
<el-input
v-model=
"accountForm.
loginps
d"
placeholder=
"请输入登录密码"
style=
"width: 300px"
></el-input>
<el-input
v-model=
"accountForm.
passwor
d"
placeholder=
"请输入登录密码"
style=
"width: 300px"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"新手机号:"
prop=
"
newTelphon
e"
>
<el-form-item
label=
"新手机号:"
prop=
"
mobil
e"
>
<el-input
v-model=
"accountForm.
newTelphon
e"
placeholder=
"请输入新的手机号码"
<el-input
v-model=
"accountForm.
mobil
e"
placeholder=
"请输入新的手机号码"
style=
"width: 300px;margin-right:20px;"
></el-input>
style=
"width: 300px;margin-right:20px;"
></el-input>
<el-button
type=
"primary"
icon=
"el-icon-edit"
@
click=
"getAccountCode()"
v-if=
"isAccountCode"
>
获取验证码
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-edit"
@
click=
"getAccountCode()"
v-if=
"isAccountCode"
>
获取验证码
</el-button>
<el-button
type=
"info"
style=
"width: 109px"
:disabled=
"true"
v-if=
"!isAccountCode"
>
倒计时
{{
accountCountDown
}}
<el-button
type=
"info"
style=
"width: 109px"
:disabled=
"true"
v-if=
"!isAccountCode"
>
倒计时
{{
accountCountDown
}}
...
@@ -51,8 +51,8 @@
...
@@ -51,8 +51,8 @@
</el-button>
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
label=
"短信验证码:"
prop=
"
verification
"
>
<el-form-item
label=
"短信验证码:"
prop=
"
code
"
>
<el-input
v-model=
"accountForm.
verification
"
placeholder=
"请输入短信验证码"
style=
"width: 300px"
></el-input>
<el-input
v-model=
"accountForm.
code
"
placeholder=
"请输入短信验证码"
style=
"width: 300px"
></el-input>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
...
@@ -64,23 +64,22 @@
...
@@ -64,23 +64,22 @@
<el-dialog
title=
"修改登录密码"
:visible
.
sync=
"isLogin"
width=
"50%"
>
<el-dialog
title=
"修改登录密码"
:visible
.
sync=
"isLogin"
width=
"50%"
>
<el-form
:model=
"loginForm"
:rules=
"loginRules"
ref=
"loginForm"
label-width=
"200px"
size=
"small"
>
<el-form
:model=
"loginForm"
:rules=
"loginRules"
ref=
"loginForm"
label-width=
"200px"
size=
"small"
>
<el-form-item
label=
"新密码:"
prop=
"
newLoginps
d"
>
<el-form-item
label=
"新密码:"
prop=
"
passwor
d"
>
<el-input
v-model=
"loginForm.
newLoginps
d"
plackeholder=
"请输入新密码"
style=
"width: 300px"
show-password
></el-input>
<el-input
v-model=
"loginForm.
passwor
d"
plackeholder=
"请输入新密码"
style=
"width: 300px"
show-password
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"确认新密码:"
prop=
"
newLoginpsdCheck
"
>
<el-form-item
label=
"确认新密码:"
prop=
"
password2
"
>
<el-input
v-model=
"loginForm.
newLoginpsdCheck
"
plackeholder=
"请输入新密码"
style=
"width: 300px"
<el-input
v-model=
"loginForm.
password2
"
plackeholder=
"请输入新密码"
style=
"width: 300px"
show-password
></el-input>
show-password
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"短信验证码:"
prop=
"
loginVerificationC
ode"
>
<el-form-item
label=
"短信验证码:"
prop=
"
c
ode"
>
<el-input
v-model=
"loginForm.
loginVerificationCode"
placeholder=
"请输入手机158****8888的验证码
"
<el-input
v-model=
"loginForm.
code"
:placeholder=
"showMobilePlaceholder
"
style=
"width: 300px;margin-right:20px;"
></el-input>
style=
"width: 300px;margin-right:20px;"
></el-input>
<el-button
type=
"primary"
icon=
"el-icon-edit"
@
click=
"getLoginCode()"
v-if=
"isLoginCode"
>
获取验证码
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-edit"
@
click=
"getLoginCode()"
v-if=
"isLoginCode"
>
获取验证码
</el-button>
<el-button
type=
"info"
style=
"width: 109px"
:disabled=
"true"
v-if=
"!isLoginCode"
>
倒计时
{{
loginCountDown
}}
S
<el-button
type=
"info"
style=
"width: 109px"
:disabled=
"true"
v-if=
"!isLoginCode"
>
倒计时
{{
loginCountDown
}}
S
</el-button>
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
...
@@ -92,17 +91,17 @@
...
@@ -92,17 +91,17 @@
<el-dialog
title=
"修改支付密码"
:visible
.
sync=
"isPay"
width=
"50%"
>
<el-dialog
title=
"修改支付密码"
:visible
.
sync=
"isPay"
width=
"50%"
>
<el-form
:model=
"payForm"
:rules=
"payRules"
ref=
"payForm"
label-width=
"200px"
size=
"small"
>
<el-form
:model=
"payForm"
:rules=
"payRules"
ref=
"payForm"
label-width=
"200px"
size=
"small"
>
<el-form-item
label=
"新密码:"
prop=
"
newPayps
d"
>
<el-form-item
label=
"新密码:"
prop=
"
passwor
d"
>
<el-input
v-model=
"payForm.
newPayps
d"
plackeholder=
"请输入新密码"
style=
"width: 300px"
show-password
></el-input>
<el-input
v-model=
"payForm.
passwor
d"
plackeholder=
"请输入新密码"
style=
"width: 300px"
show-password
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"确认新密码:"
prop=
"
newPaypsdCheck
"
>
<el-form-item
label=
"确认新密码:"
prop=
"
password2
"
>
<el-input
v-model=
"payForm.
newPaypsdCheck
"
plackeholder=
"请输入新密码"
style=
"width: 300px"
<el-input
v-model=
"payForm.
password2
"
plackeholder=
"请输入新密码"
style=
"width: 300px"
show-password
></el-input>
show-password
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"短信验证码:"
prop=
"
payVerificationC
ode"
>
<el-form-item
label=
"短信验证码:"
prop=
"
c
ode"
>
<el-input
v-model=
"payForm.
payVerificationCode"
placeholder=
"请输入手机158****8888的验证码
"
<el-input
v-model=
"payForm.
code"
:placeholder=
"showMobilePlaceholder
"
style=
"width: 300px;margin-right:20px;"
></el-input>
style=
"width: 300px;margin-right:20px;"
></el-input>
<el-button
type=
"primary"
icon=
"el-icon-edit"
@
click=
"getPayCode()"
v-if=
"isPayCode"
>
获取验证码
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-edit"
@
click=
"getPayCode()"
v-if=
"isPayCode"
>
获取验证码
</el-button>
<el-button
type=
"info"
style=
"width: 109px"
:disabled=
"true"
v-if=
"!isPayCode"
>
倒计时
{{
payCountDown
}}
S
<el-button
type=
"info"
style=
"width: 109px"
:disabled=
"true"
v-if=
"!isPayCode"
>
倒计时
{{
payCountDown
}}
S
...
@@ -113,14 +112,14 @@
...
@@ -113,14 +112,14 @@
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel('payForm')"
>
取 消
</el-button>
<el-button
@
click=
"cancel('payForm')"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submitPay"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"submitPay
('payForm')
"
>
确 定
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
changeTelphone
,
getTelphoneCode
}
from
'@/api/module/settings'
import
{
changeTelphone
,
getTelphoneCode
,
changeLoginPassword
,
changePayPassword
}
from
'@/api/module/settings'
export
default
{
export
default
{
name
:
"Setpsd"
,
name
:
"Setpsd"
,
...
@@ -151,7 +150,7 @@
...
@@ -151,7 +150,7 @@
let
checkNewPsdAgain
=
(
rule
,
value
,
callback
)
=>
{
let
checkNewPsdAgain
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
''
)
{
if
(
value
===
''
)
{
callback
(
new
Error
(
'密码不能为空'
));
callback
(
new
Error
(
'密码不能为空'
));
}
else
if
(
value
!==
this
.
loginForm
.
newLoginps
d
)
{
}
else
if
(
value
!==
this
.
loginForm
.
passwor
d
)
{
callback
(
new
Error
(
'两次密码不一致,请检查后重新输入'
));
callback
(
new
Error
(
'两次密码不一致,请检查后重新输入'
));
}
else
{
}
else
{
callback
();
callback
();
...
@@ -163,7 +162,7 @@
...
@@ -163,7 +162,7 @@
if
(
value
===
''
)
{
if
(
value
===
''
)
{
callback
(
new
Error
(
'密码不能为空'
));
callback
(
new
Error
(
'密码不能为空'
));
}
else
if
(
!
reg
.
test
(
value
))
{
}
else
if
(
!
reg
.
test
(
value
))
{
callback
(
new
Error
(
'密码位
8
位数字'
));
callback
(
new
Error
(
'密码位
6
位数字'
));
}
else
{
}
else
{
callback
();
callback
();
}
}
...
@@ -172,7 +171,7 @@
...
@@ -172,7 +171,7 @@
let
checkPayPsdAgain
=
(
rule
,
value
,
callback
)
=>
{
let
checkPayPsdAgain
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
''
)
{
if
(
value
===
''
)
{
callback
(
new
Error
(
'密码不能为空'
));
callback
(
new
Error
(
'密码不能为空'
));
}
else
if
(
value
!==
this
.
payForm
.
newPayps
d
)
{
}
else
if
(
value
!==
this
.
payForm
.
passwor
d
)
{
callback
(
new
Error
(
'两次密码不一致,请检查后重新输入'
));
callback
(
new
Error
(
'两次密码不一致,请检查后重新输入'
));
}
else
{
}
else
{
callback
();
callback
();
...
@@ -188,45 +187,49 @@
...
@@ -188,45 +187,49 @@
accountCountDown
:
''
,
accountCountDown
:
''
,
loginCountDown
:
''
,
loginCountDown
:
''
,
payCountDown
:
''
,
payCountDown
:
''
,
showMobilePlaceholder
:
''
,
setForm
:
{
setForm
:
{
name
:
''
,
name
:
''
,
loginpsd
:
'******'
,
loginpsd
:
'******'
,
paypsd
:
'******'
paypsd
:
'******'
},
},
accountForm
:
{
accountForm
:
{
loginps
d
:
''
,
passwor
d
:
''
,
newTelphon
e
:
''
,
mobil
e
:
''
,
verification
:
''
code
:
''
},
},
accountRules
:
{
accountRules
:
{
loginps
d
:
[{
required
:
true
,
message
:
'登录密码不能为空'
,
trigger
:
'blur'
}],
passwor
d
:
[{
required
:
true
,
message
:
'登录密码不能为空'
,
trigger
:
'blur'
}],
newTelphon
e
:
[{
required
:
true
,
validator
:
checkTel
,
trigger
:
'blur'
}],
mobil
e
:
[{
required
:
true
,
validator
:
checkTel
,
trigger
:
'blur'
}],
verification
:
[{
required
:
true
,
message
:
'验证码不能为空'
,
trigger
:
'blur'
}],
code
:
[{
required
:
true
,
message
:
'验证码不能为空'
,
trigger
:
'blur'
}],
},
},
loginForm
:
{
loginForm
:
{
newLoginps
d
:
''
,
passwor
d
:
''
,
newLoginpsdCheck
:
''
,
password2
:
''
,
loginVerificationC
ode
:
''
c
ode
:
''
},
},
loginRules
:
{
loginRules
:
{
newLoginps
d
:
[{
required
:
true
,
validator
:
checkNewPsd
,
trigger
:
'blur'
}],
passwor
d
:
[{
required
:
true
,
validator
:
checkNewPsd
,
trigger
:
'blur'
}],
newLoginpsdCheck
:
[{
required
:
true
,
validator
:
checkNewPsdAgain
,
trigger
:
'blur'
}],
password2
:
[{
required
:
true
,
validator
:
checkNewPsdAgain
,
trigger
:
'blur'
}],
loginVerificationC
ode
:
[{
required
:
true
,
message
:
'验证码不能为空'
,
trigger
:
'blur'
}]
c
ode
:
[{
required
:
true
,
message
:
'验证码不能为空'
,
trigger
:
'blur'
}]
},
},
payForm
:
{
payForm
:
{
newPayps
d
:
''
,
passwor
d
:
''
,
newPaypsdCheck
:
''
,
password2
:
''
,
payVerificationC
ode
:
''
,
c
ode
:
''
,
},
},
payRules
:
{
payRules
:
{
newPayps
d
:
[{
required
:
true
,
validator
:
checkPayPsd
,
trigger
:
'blur'
}],
passwor
d
:
[{
required
:
true
,
validator
:
checkPayPsd
,
trigger
:
'blur'
}],
newPaypsdCheck
:
[{
required
:
true
,
validator
:
checkPayPsdAgain
,
trigger
:
'blur'
}],
password2
:
[{
required
:
true
,
validator
:
checkPayPsdAgain
,
trigger
:
'blur'
}],
payVerificationC
ode
:
[{
required
:
true
,
message
:
'验证码不能为空'
,
trigger
:
'blur'
}],
c
ode
:
[{
required
:
true
,
message
:
'验证码不能为空'
,
trigger
:
'blur'
}],
}
}
}
}
},
},
mounted
()
{
mounted
()
{
this
.
setForm
.
name
=
this
.
$store
.
state
.
user
.
name
;
this
.
setForm
.
name
=
this
.
$store
.
state
.
user
.
name
;
console
.
log
(
333
,
this
.
setForm
.
name
);
let
repStr
=
this
.
setForm
.
name
.
substring
(
3
,
7
);
this
.
showMobilePlaceholder
=
'请输入'
+
this
.
setForm
.
name
.
replace
(
repStr
,
'****'
)
+
'的验证码'
;
},
},
methods
:
{
methods
:
{
// 修改 账号
// 修改 账号
...
@@ -241,17 +244,17 @@
...
@@ -241,17 +244,17 @@
editPay
()
{
editPay
()
{
this
.
isPay
=
true
;
this
.
isPay
=
true
;
},
},
// 获取验证码
//
修改账号
获取验证码
getAccountCode
()
{
getAccountCode
()
{
// 先校验
// 先校验
if
(
this
.
accountForm
.
loginps
d
===
''
)
{
if
(
this
.
accountForm
.
passwor
d
===
''
)
{
this
.
$refs
.
accountForm
.
validateField
(
'
loginps
d'
);
this
.
$refs
.
accountForm
.
validateField
(
'
passwor
d'
);
return
;
return
;
}
}
//
//
const
telphoneReg
=
/^1
[
3456789
]\d{9}
$/
;
const
telphoneReg
=
/^1
[
3456789
]\d{9}
$/
;
if
(
!
telphoneReg
.
test
(
this
.
accountForm
.
newTelphon
e
))
{
if
(
!
telphoneReg
.
test
(
this
.
accountForm
.
mobil
e
))
{
this
.
$refs
.
accountForm
.
validateField
(
'
newTelphon
e'
);
this
.
$refs
.
accountForm
.
validateField
(
'
mobil
e'
);
return
;
return
;
}
}
const
TIME_COUNT
=
60
;
const
TIME_COUNT
=
60
;
...
@@ -269,17 +272,26 @@
...
@@ -269,17 +272,26 @@
}
}
},
1000
)
},
1000
)
}
}
// 获取验证码
getTelphoneCode
(
this
.
accountForm
.
mobile
).
then
(
res
=>
{
if
(
res
.
code
===
1
)
{
this
.
$message
({
type
:
"success"
,
message
:
'验证码发送成功'
});
}
else
{
this
.
$message
({
type
:
"error"
,
message
:
'验证码发送失败'
});
}
});
},
},
// 修改登录密码的 获取校验码 loginCountDown
// 修改登录密码的 获取校验码 loginCountDown
getLoginCode
()
{
getLoginCode
()
{
let
loginpsdReg
=
/^
(?![
0-9
]
+$
)(?![
a-zA-Z
]
+$
)[
0-9A-Za-z
]{8,16}
$/
;
let
loginpsdReg
=
/^
(?![
0-9
]
+$
)(?![
a-zA-Z
]
+$
)[
0-9A-Za-z
]{8,16}
$/
;
if
(
this
.
loginForm
.
newLoginpsd
===
''
||
!
loginpsdReg
.
test
(
this
.
loginForm
.
newLoginps
d
))
{
if
(
this
.
loginForm
.
password
===
''
||
!
loginpsdReg
.
test
(
this
.
loginForm
.
passwor
d
))
{
this
.
$refs
.
loginForm
.
validateField
(
'
newLoginps
d'
);
this
.
$refs
.
loginForm
.
validateField
(
'
passwor
d'
);
return
;
return
;
}
}
if
(
this
.
loginForm
.
newLoginpsdCheck
===
''
||
this
.
loginForm
.
newLoginpsdCheck
!==
this
.
loginForm
.
newLoginps
d
)
{
if
(
this
.
loginForm
.
password2
===
''
||
this
.
loginForm
.
password2
!==
this
.
loginForm
.
passwor
d
)
{
this
.
$refs
.
loginForm
.
validateField
(
'
newLoginpsdCheck
'
);
this
.
$refs
.
loginForm
.
validateField
(
'
password2
'
);
return
;
return
;
}
}
...
@@ -297,17 +309,24 @@
...
@@ -297,17 +309,24 @@
}
}
},
1000
)
},
1000
)
}
}
getTelphoneCode
(
this
.
setForm
.
name
).
then
(
res
=>
{
if
(
res
.
code
===
1
)
{
this
.
$message
({
type
:
"success"
,
message
:
'验证码发送成功'
});
}
else
{
this
.
$message
({
type
:
"error"
,
message
:
'验证码发送失败'
});
}
});
},
},
// 修改支付密码,获取手机验证码
// 修改支付密码,获取手机验证码
getPayCode
()
{
getPayCode
()
{
let
paypsdReg
=
/^
[
0-9
]{6}
$/
;
let
paypsdReg
=
/^
[
0-9
]{6}
$/
;
if
(
this
.
payForm
.
newPaypsd
===
''
||
!
paypsdReg
.
test
(
this
.
payForm
.
newPayps
d
))
{
if
(
this
.
payForm
.
password
===
''
||
!
paypsdReg
.
test
(
this
.
payForm
.
passwor
d
))
{
this
.
$refs
.
payForm
.
validateField
(
'
newPayps
d'
);
this
.
$refs
.
payForm
.
validateField
(
'
passwor
d'
);
return
;
return
;
}
}
if
(
this
.
payForm
.
newPaypsdCheck
===
''
||
this
.
payForm
.
newPaypsdCheck
!==
this
.
payForm
.
newPayps
d
)
{
if
(
this
.
payForm
.
password2
===
''
||
this
.
payForm
.
password2
!==
this
.
payForm
.
passwor
d
)
{
this
.
$refs
.
payForm
.
validateField
(
'
newPaypsdCheck
'
);
this
.
$refs
.
payForm
.
validateField
(
'
password2
'
);
return
;
return
;
}
}
...
@@ -325,32 +344,69 @@
...
@@ -325,32 +344,69 @@
}
}
},
1000
)
},
1000
)
}
}
// 获取手机验证码
getTelphoneCode
(
this
.
setForm
.
name
).
then
(
res
=>
{
// getTelphoneCode(this.loginForm).then(res => {
if
(
res
.
code
===
1
)
{
//
this
.
$message
({
type
:
"success"
,
message
:
'验证码发送成功'
});
// });
}
else
{
this
.
$message
({
type
:
"error"
,
message
:
'验证码发送失败'
});
}
});
},
},
// 平台登录账号
确定
// 平台登录账号
修改 提交
submitAccount
(
formName
)
{
submitAccount
(
formName
)
{
this
.
$refs
[
formName
].
validate
(
valid
=>
{
this
.
$refs
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
// 接口
changeTelphone
(
this
.
accountForm
).
then
(
res
=>
{
changeTelphone
(
this
.
accountForm
).
then
(
res
=>
{
console
.
log
(
'修改手机号返回结果'
,
res
);
if
(
res
.
code
===
1
)
{
this
.
$message
({
type
:
"success"
,
message
:
'登录账号修改成功,需重新登录'
});
// 修改成功,则强制退出,重新登录
this
.
$store
.
dispatch
(
'LogOut'
).
then
(()
=>
{
var
ssa
=
window
.
location
.
host
setTimeout
(
function
(){
if
(
ssa
==
'localhost:1024'
){
window
.
location
.
href
=
'http://sso.jxhh.com/logout?redirect=http://'
+
ssa
+
'/login'
}
else
{
window
.
location
.
href
=
'http://sso.jxhh.com/logout?redirect=http://'
+
ssa
+
'/login'
}
},
1000
)
})
}
else
{
let
msg
=
res
.
msg
||
'修改失败'
;
this
.
$message
({
type
:
"error"
,
message
:
msg
});
}
this
.
clearAccountCodeDown
();
this
.
isAccount
=
false
;
});
});
this
.
clearAccountCodeDown
();
this
.
isAccount
=
false
;
}
}
});
});
},
},
// 登录密码 确定
// 登录密码 确定
submitLogin
(
formName
)
{
submitLogin
(
formName
)
{
console
.
log
(
378
,
this
.
loginForm
);
this
.
$refs
[
formName
].
validate
(
valid
=>
{
this
.
$refs
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
changeLoginPassword
(
this
.
loginForm
).
then
(
res
=>
{
this
.
clearAccountCodeDown
();
if
(
res
.
code
===
1
)
{
this
.
isLogin
=
false
;
this
.
$message
({
type
:
"success"
,
message
:
'登录密码修改成功,需重新登录'
});
// 修改成功,则强制退出,重新登录
this
.
$store
.
dispatch
(
'LogOut'
).
then
(()
=>
{
var
ssa
=
window
.
location
.
host
setTimeout
(
function
(){
if
(
ssa
==
'localhost:1024'
){
window
.
location
.
href
=
'http://sso.jxhh.com/logout?redirect=http://'
+
ssa
+
'/login'
}
else
{
window
.
location
.
href
=
'http://sso.jxhh.com/logout?redirect=http://'
+
ssa
+
'/login'
}
},
1000
)
})
}
else
{
let
msg
=
res
.
msg
||
'修改失败'
;
this
.
$message
({
type
:
"error"
,
message
:
msg
});
}
this
.
clearAccountCodeDown
();
this
.
isLogin
=
false
;
});
}
}
});
});
},
},
...
@@ -358,8 +414,16 @@
...
@@ -358,8 +414,16 @@
submitPay
(
formName
)
{
submitPay
(
formName
)
{
this
.
$refs
[
formName
].
validate
(
valid
=>
{
this
.
$refs
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
changePayPassword
(
this
.
payForm
).
then
(
res
=>
{
this
.
isPay
=
false
;
if
(
res
.
code
===
1
)
{
this
.
$message
({
type
:
"success"
,
message
:
'支付密码修改成功'
});
}
else
{
let
msg
=
res
.
msg
||
'修改失败'
;
this
.
$message
({
type
:
"error"
,
message
:
msg
});
}
this
.
clearAccountCodeDown
();
this
.
isPay
=
false
;
});
}
}
});
});
},
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论