Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mall-webview
Project
Project
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
frontend
mall-webview
Commits
968f58e5
Commit
968f58e5
authored
Apr 12, 2021
by
wykolor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化获取验证码
parent
4c213d5f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
10 deletions
+18
-10
index.vue
src/views/bonus/withdraw/index.vue
+18
-10
No files found.
src/views/bonus/withdraw/index.vue
View file @
968f58e5
...
...
@@ -210,16 +210,24 @@ const Withdraw = defineComponent({
async
(
res
:
TencentCaptchaResponse
)
=>
{
const
{
ret
,
randstr
,
ticket
}
=
res
;
if
(
ret
===
0
)
{
state
.
smsVerifyPass
=
true
;
state
.
tencentCaptchPass
=
true
;
countDown
(
60
,
1000
,
(
time
:
number
)
=>
{
time
===
0
?
(
state
.
showTime
=
`获取验证码`
)
:
(
state
.
showTime
=
`
${
time
}
后再获取`
);
if
(
time
===
0
)
{
state
.
smsVerifyPass
=
false
;
}
});
const
{
data
}
=
await
checkCaptcha
({
randStr
:
randstr
,
ticket
});
state
.
mobileTip
=
data
;
state
.
smsVerifyPass
=
true
;
try
{
const
{
data
}
=
await
checkCaptcha
({
randStr
:
randstr
,
ticket
});
Toast
(
"发送验证码成功"
);
state
.
mobileTip
=
data
;
countDown
(
60
,
1000
,
(
time
:
number
)
=>
{
time
===
0
?
(
state
.
showTime
=
`获取验证码`
)
:
(
state
.
showTime
=
`
${
time
}
后再获取`
);
if
(
time
===
0
)
{
state
.
smsVerifyPass
=
false
;
}
});
}
catch
{
Toast
(
"发送验证码失败,请重试"
);
state
.
smsVerifyPass
=
false
;
}
}
},
{
...
...
@@ -441,7 +449,7 @@ export default Withdraw;
.van-button
{
width
:
220px
;
height
:
80px
;
background
:
#027
AFF
;
background
:
#027
aff
;
border-radius
:
0px
8px
8px
0px
;
font-size
:
26px
;
box-sizing
:
border-box
;
...
...
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