Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cauchy-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
cauchy-ui
Commits
31fe4815
Commit
31fe4815
authored
Oct 10, 2021
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 处理sms手机号null的问题
parent
b10619c6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
pay.api.js
src/api/pay.api.js
+7
-1
SmsModal.vue
src/views/pay/components/SmsModal.vue
+5
-6
No files found.
src/api/pay.api.js
View file @
31fe4815
...
...
@@ -71,6 +71,11 @@ const reissueContract = function(params) {
return
request
.
post
(
`
${
talosHost
}
/open/checkout/payReissueContract`
,
params
);
};
// 获取用户手机号
const
getPhoneNumber
=
function
()
{
return
request
.
get
(
`
${
talosHost
}
/api/kdsp/user/phone`
);
};
export
{
pay
,
prepay
,
...
...
@@ -83,5 +88,6 @@ export {
getGoodsList
,
kaGetNextUrl
,
queryPayStatus
,
reissueContract
reissueContract
,
getPhoneNumber
};
src/views/pay/components/SmsModal.vue
View file @
31fe4815
...
...
@@ -29,8 +29,7 @@
</
template
>
<
script
>
import
localStorage
from
'
@/service/localStorage.service
'
;
import
{
sendSms
as
sendSmsApi
}
from
'
@/api/pay.api
'
;
import
{
sendSms
as
sendSmsApi
,
getPhoneNumber
}
from
'
@/api/pay.api
'
;
export
default
{
props
:
{
value
:
{
...
...
@@ -45,7 +44,8 @@ export default {
return
{
send
:
false
,
time
:
60
,
timer
:
null
timer
:
null
,
phoneNumber
:
''
};
},
computed
:
{},
...
...
@@ -83,9 +83,8 @@ export default {
}
},
getPhone
()
{
const
phone
=
localStorage
.
get
(
'
phoneNo
'
);
const
phoneS
=
`
${
phone
}
`
.
replace
(
/
(\d{3})\d
*
(\d{4})
/
,
'
+86 $1 **** $2
'
);
return
phoneS
;
const
[
phoneNumber
]
=
await
getPhoneNumber
();
this
.
phoneNumber
=
phoneNumber
;
},
clearTimer
()
{
clearInterval
(
this
.
timer
);
...
...
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