Browse Source

联系客服

master
chenkun 7 months ago
parent
commit
a5f488e2fa
1 changed files with 36 additions and 2 deletions
  1. +36
    -2
      components/config/customerServicePopup.vue

+ 36
- 2
components/config/customerServicePopup.vue View File

@ -60,14 +60,48 @@
}
},
methods: {
open(){
open() {
this.show = true
},
close(){
close() {
this.show = false
},
//
confirm() {
this.show = false
let phone = "13575038513"; //
// console.log('', phone)
const res = uni.getSystemInfoSync();
// ios
if (res.platform == 'ios') {
uni.makePhoneCall({
phoneNumber: phone,
success() {
console.log('ios拨打成功');
},
fail() {
console.log('ios拨打失败');
}
})
} else {
//showActionSheet
uni.showActionSheet({
itemList: [phone, '呼叫'],
success: function(res) {
if (res.tapIndex == 1) {
uni.makePhoneCall({
phoneNumber: phone,
success() {
console.log('安卓拨打成功');
},
fail() {
console.log('安卓拨打失败');
}
})
}
}
})
}
},
}
}


Loading…
Cancel
Save