Commit c9bc8ed6 authored by 杨鑫's avatar 杨鑫

Merge branch 'hotfix' into 'master'

Hotfix

See merge request !14
parents b10619c6 f1fe789f
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -71,6 +71,11 @@ const reissueContract = function(params) { ...@@ -71,6 +71,11 @@ const reissueContract = function(params) {
return request.post(`${talosHost}/open/checkout/payReissueContract`, params); return request.post(`${talosHost}/open/checkout/payReissueContract`, params);
}; };
// 获取用户手机号
const getPhoneNumber = function() {
return request.get(`${talosHost}/api/kdsp/user/phone`);
};
export { export {
pay, pay,
prepay, prepay,
...@@ -83,5 +88,6 @@ export { ...@@ -83,5 +88,6 @@ export {
getGoodsList, getGoodsList,
kaGetNextUrl, kaGetNextUrl,
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);
......
This diff is collapsed.
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