Commit 0b005b4a authored by Xuguangxing's avatar Xuguangxing

fix

parent a42a6cb5
...@@ -84,7 +84,10 @@ export default { ...@@ -84,7 +84,10 @@ export default {
const getCouponList = function(params) { const getCouponList = function(params) {
return request.get(`${talosHost}/api/kdsp/appconfig/pay-succ-page/guide-stream`, { params }); return request.get(`${talosHost}/api/kdsp/appconfig/pay-succ-page/guide-stream`, { params });
}; };
// 获取用户手机号
const getPhoneNumber = function() {
return request.get(`${talosHost}/api/kdsp/user/phone`);
};
export { export {
pay, pay,
prepay, prepay,
...@@ -98,5 +101,6 @@ export { ...@@ -98,5 +101,6 @@ export {
kaGetNextUrl, kaGetNextUrl,
getCouponList, getCouponList,
queryPayStatus, queryPayStatus,
reissueContract reissueContract,
getPhoneNumber
}; };
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<p class="sms-icon"><cr-icon type="cross" color="#999999" @click="closeModal" /></p> <p class="sms-icon"><cr-icon type="cross" color="#999999" @click="closeModal" /></p>
<p class="sms-title">请输入短信验证码</p> <p class="sms-title">请输入短信验证码</p>
<p class="sms-des">为保证您账户安全,此笔交易需要短信验证</p> <p class="sms-des">为保证您账户安全,此笔交易需要短信验证</p>
<p class="phone">已发送至 {{ getPhone() }}</p> <p class="phone">已发送至 {{ phoneNumber }}</p>
<cr-authcode-field <cr-authcode-field
span-size="24px" span-size="24px"
type="number" type="number"
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
</template> </template>
<script> <script>
import localStorage from '@/service/localStorage.service'; import { sendSms as sendSmsApi, getPhoneNumber } from '@/api/pay.api';
import { sendSms as sendSmsApi } from '@/api/pay.api';
export default { export default {
props: { props: {
value: { value: {
...@@ -45,7 +44,8 @@ export default { ...@@ -45,7 +44,8 @@ export default {
return { return {
send: false, send: false,
time: 60, time: 60,
timer: null timer: null,
phoneNumber: ''
}; };
}, },
computed: {}, computed: {},
...@@ -57,9 +57,9 @@ export default { ...@@ -57,9 +57,9 @@ export default {
}, },
errorInfo: function() {} errorInfo: function() {}
}, },
onShow() {}, created() {
onLoad() {}, this.getPhone();
onReady() {}, },
methods: { methods: {
closeModal() { closeModal() {
this.clearTimer(); this.clearTimer();
...@@ -82,10 +82,9 @@ export default { ...@@ -82,10 +82,9 @@ export default {
}, 1000); }, 1000);
} }
}, },
getPhone() { async getPhone() {
const phone = localStorage.get('phoneNo'); const [phoneNumber] = await getPhoneNumber();
const phoneS = `${phone}`.replace(/(\d{3})\d*(\d{4})/, '+86 $1 **** $2'); this.phoneNumber = phoneNumber;
return phoneS;
}, },
clearTimer() { clearTimer() {
clearInterval(this.timer); clearInterval(this.timer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment