Commit 0b005b4a authored by Xuguangxing's avatar Xuguangxing

fix

parent a42a6cb5
......@@ -84,7 +84,10 @@ export default {
const getCouponList = function(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 {
pay,
prepay,
......@@ -98,5 +101,6 @@ export {
kaGetNextUrl,
getCouponList,
queryPayStatus,
reissueContract
reissueContract,
getPhoneNumber
};
......@@ -5,7 +5,7 @@
<p class="sms-icon"><cr-icon type="cross" color="#999999" @click="closeModal" /></p>
<p class="sms-title">请输入短信验证码</p>
<p class="sms-des">为保证您账户安全,此笔交易需要短信验证</p>
<p class="phone">已发送至 {{ getPhone() }}</p>
<p class="phone">已发送至 {{ phoneNumber }}</p>
<cr-authcode-field
span-size="24px"
type="number"
......@@ -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: {},
......@@ -57,9 +57,9 @@ export default {
},
errorInfo: function() {}
},
onShow() {},
onLoad() {},
onReady() {},
created() {
this.getPhone();
},
methods: {
closeModal() {
this.clearTimer();
......@@ -82,10 +82,9 @@ export default {
}, 1000);
}
},
getPhone() {
const phone = localStorage.get('phoneNo');
const phoneS = `${phone}`.replace(/(\d{3})\d*(\d{4})/, '+86 $1 **** $2');
return phoneS;
async getPhone() {
const [phoneNumber] = await getPhoneNumber();
this.phoneNumber = phoneNumber;
},
clearTimer() {
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