Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
traceSourceMb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yanyanhong
traceSourceMb
Commits
425de011
Commit
425de011
authored
Jul 31, 2020
by
yyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设置手机号验证码发送逻辑
parent
6d6b594c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
SetPhone.vue
src/views/userCenter/SetPhone.vue
+4
-4
No files found.
src/views/userCenter/SetPhone.vue
View file @
425de011
...
...
@@ -4,7 +4,7 @@
<div
style=
"font-size: 20px;"
>
已绑定手机号
</div>
<div
class=
"title"
style=
"font-size:25px;margin-top:5px;margin-bottom:22px;"
>
{{
userInfo
.
phone
||
userInfo
.
email
}}
</div>
<div
style=
"font-size:14px;color:#737582;"
>
绑定手机号将作为您身份验证的重要方式,请谨慎操作!
</div>
<van-button
block
style=
"margin-top: 60px;"
type=
"info"
@
click=
"step = '2'"
>
更改手机号
</van-button>
<van-button
block
style=
"margin-top: 60px;"
type=
"info"
@
click=
"step = '2'
;sendCode()();
"
>
更改手机号
</van-button>
<div
style=
"font-size:12px;color:#999999;margin-top:17px;"
>
变更手机号后,将自动同步新手机号为登录账号
</div>
</section>
<code-input
...
...
@@ -16,7 +16,7 @@
<section
v-if=
"step === '3'"
>
<div
class=
"title"
>
输入新手机号
</div>
<van-field
v-model=
"newPhone"
label=
""
placeholder=
"请输入新手机号"
class=
"margin-top30"
></van-field>
<van-button
block
type=
"info"
class=
"margin-top30"
@
click=
"step='4'"
>
确定
</van-button>
<van-button
block
type=
"info"
class=
"margin-top30"
@
click=
"step='4'
;sendCode(newPhone)();
"
>
确定
</van-button>
</section>
<code-input
v-if=
"step === '4'"
...
...
@@ -59,10 +59,10 @@ export default class SetPhone extends Vue {
return
this
.
isPhone
?
0
:
1
;
}
private
sendSms
(
account
:
string
=
''
)
{
return
this
.
$api
.
user
.
sendSms
(
account
||
this
.
userInfo
.
phone
,
1
);
// 1 修改密码
return
this
.
$api
.
user
.
sendSms
(
account
||
this
.
userInfo
.
phone
,
3
);
// 1 修改密码
}
private
sendEmail
(
account
:
string
=
''
)
{
return
this
.
$api
.
user
.
sendEmail
(
account
||
this
.
userInfo
.
email
,
1
);
// 1 修改密码
return
this
.
$api
.
user
.
sendEmail
(
account
||
this
.
userInfo
.
email
,
3
);
// 1 修改密码
}
private
sendCode
(
account
:
string
=
''
)
{
return
async
()
=>
{
...
...
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