虚拟电话
This commit is contained in:
parent
98b79c34de
commit
15cb998706
|
@ -1772,7 +1772,8 @@
|
|||
imgList: [],
|
||||
koufeiMoney: '',
|
||||
xiangmuMoney: '',
|
||||
jishishouyi: ''
|
||||
jishishouyi: '',
|
||||
middleNumber: ''
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -1813,6 +1814,7 @@
|
|||
// }
|
||||
this.ordersId = e.ordersId
|
||||
this.orderIdSend = e.ordersId;
|
||||
this.phone = uni.getStorageSync('phone');
|
||||
// this.getOrder()
|
||||
},
|
||||
onShow() {
|
||||
|
@ -1883,25 +1885,48 @@
|
|||
methods: {
|
||||
//绑定虚拟号
|
||||
bindPhone(){
|
||||
console.log('手机号是:',this.phone);
|
||||
let that = this;
|
||||
console.log('手机号是:',that.phone);
|
||||
if(that.phone==null|| that.phone==''){
|
||||
this.$queue.showToast('获取技师电话号码错误!');
|
||||
return;
|
||||
}
|
||||
//调试时先写个假的
|
||||
//this.phone = '13080011344'
|
||||
this.$Request.get('/app/user/insertVirtualPhoneAxN?phone=' + this.phone).then(res => {
|
||||
console.log('返回的全部数据:',res);
|
||||
if (res.code == 0) {
|
||||
console.log('返回数据是:',res.data);
|
||||
let middleNumber = res.data.middleNumber;
|
||||
console.log('虚拟号是:',middleNumber);
|
||||
if(res.data.result === '000000'){
|
||||
if(that.middleNumber != null && that.middleNumber != ''){
|
||||
//弹出提示框,告知号码
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '绑定号码为:' + middleNumber + ",是否拨打该电话?",
|
||||
content: '绑定号码为:' + that.middleNumber + ",是否拨打该电话?",
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
//直接拨打号码(拨打到打电话页(未点击拨号))
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: middleNumber,
|
||||
phoneNumber: that.middleNumber,
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
})
|
||||
return;
|
||||
}
|
||||
this.$Request.get('/app/user/insertVirtualPhoneAxN?phone=' + that.phone).then(res => {
|
||||
console.log('返回的全部数据:',res);
|
||||
if (res.code == 0) {
|
||||
console.log('返回数据是:',res.data);
|
||||
that.middleNumber = res.data.middleNumber;
|
||||
console.log('虚拟号是:',that.middleNumber);
|
||||
if(res.data.result === '000000'){
|
||||
//弹出提示框,告知号码
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '绑定号码为:' + that.middleNumber + ",是否拨打该电话?",
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
//直接拨打号码(拨打到打电话页(未点击拨号))
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: that.middleNumber,
|
||||
})
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
|
|
Loading…
Reference in New Issue