虚拟电话

This commit is contained in:
曹磊 2024-08-28 22:00:29 +08:00
parent 98b79c34de
commit 15cb998706
1 changed files with 32 additions and 7 deletions

View File

@ -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('用户点击取消');