Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
so-manage-ui
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
smart-operation
so-manage-ui
Commits
22bf74d2
Commit
22bf74d2
authored
Jul 11, 2023
by
李鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改密码接口联调
parent
6c34a2b3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
14 deletions
+21
-14
src/page/password/account-form.vue
src/page/password/account-form.vue
+19
-8
src/page/password/index.vue
src/page/password/index.vue
+2
-6
No files found.
src/page/password/account-form.vue
View file @
22bf74d2
...
...
@@ -16,7 +16,11 @@
<div
class=
"msg-code"
>
<el-input
v-model=
"accountForm.code"
placeholder=
"请输入"
style=
"860px"
>
</el-input>
<div
class=
"yzm_img"
>
<el-button
type=
"primary"
:disabled=
"countDown > 0"
@
click.prevent=
"getMsgCode()"
style=
"width: 100%; height: 34px"
>
<el-button
type=
"primary"
:disabled=
"countDown > 0"
@
click.prevent=
"getMsgCode()"
style=
"width: 100%; height: 34px"
>
{{
countDown
>
0
?
countDown
+
"
秒后再次获取
"
:
"
发送验证码
"
}}
</el-button>
</div>
...
...
@@ -51,13 +55,20 @@ const countDownTimer = ref(null);
const
accountRef
=
ref
(
null
);
const
emit
=
defineEmits
([
"
action
"
]);
const
submitForm
=
async
()
=>
{
const
submitForm
=
()
=>
{
if
(
!
accountRef
)
return
;
await
accountRef
.
value
.
validate
((
valid
,
fields
)
=>
{
accountRef
.
value
.
validate
((
valid
,
fields
)
=>
{
if
(
valid
)
{
axios
.
post
(
"
/v1/api/user/forget/pwd/check
"
,
{
phone
:
accountForm
.
phone
,
code
:
accountForm
.
code
})
.
then
(({
data
})
=>
{
if
(
data
.
code
==
200
)
{
emit
(
"
action
"
,
accountForm
);
}
else
{
emit
(
"
action
"
,
null
);
ElMessage
.
error
(
data
.
data
);
}
});
}
});
};
...
...
@@ -73,7 +84,7 @@ const setForm = (data) => {
const
getMsgCode
=
()
=>
{
if
(
accountForm
.
account
)
{
axios
.
post
(
"
/
apaas/system/v5
/sms/verifyCode
"
,
{
phone
:
accountForm
.
phone
}).
then
(({
data
})
=>
{
axios
.
post
(
"
/
v1/api/user
/sms/verifyCode
"
,
{
phone
:
accountForm
.
phone
}).
then
(({
data
})
=>
{
if
(
data
.
code
==
200
)
{
countDownAction
();
}
else
{
...
...
@@ -104,7 +115,7 @@ const phoneChange = () => {
if
(
accountForm
.
phone
.
length
>
10
)
{
accountRef
.
value
.
validateField
(
"
phone
"
).
then
((
valid
)
=>
{
if
(
valid
)
{
axios
.
get
(
`/
apaas/system/v5
/user/phoneToAccount?phone=
${
accountForm
.
phone
}
`
).
then
((
res
)
=>
{
axios
.
get
(
`/
v1/api
/user/phoneToAccount?phone=
${
accountForm
.
phone
}
`
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
accountForm
.
account
=
res
.
data
.
data
||
""
;
}
else
{
...
...
src/page/password/index.vue
View file @
22bf74d2
...
...
@@ -53,10 +53,7 @@
ref=
"accountFromRef"
:form-type=
"route.query.id ? true : false"
@
action=
"getAccountFromData"
></accountFrom>
<passwordForm
v-show=
"step === 2"
ref=
"passwordFormRef"
@
action=
"getPasswordFormData"
></passwordForm>
<passwordForm
v-show=
"step === 2"
ref=
"passwordFormRef"
@
action=
"getPasswordFormData"
></passwordForm>
<div
class=
"process_end"
v-show=
"step === 3"
>
<div>
<div>
...
...
@@ -120,7 +117,6 @@ const getAccountFromData = (data) => {
Object
.
assign
(
formData
,
data
);
step
.
value
=
2
;
//校验手机号验证码 未出接口
}
else
{
}
};
//密码表单检验触发事件 data为null 校验失败
...
...
@@ -131,7 +127,7 @@ const getPasswordFormData = (data) => {
phone
:
formData
.
phone
,
password
:
Encrypt
(
formData
.
new_password
),
};
axios
.
post
(
`/
apaas/system/v5
/user/update/pwd`
,
params
).
then
((
res
)
=>
{
axios
.
post
(
`/
v1/api
/user/update/pwd`
,
params
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
successFlag
.
value
=
true
;
}
else
{
...
...
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