<view @click="callPhone">电话</view>
customerServicePhone:'123456789'
callPhone() {
if (confirm('确定要拨打客服电话吗?电话号码为:' + this.customerServicePhone)) {
window.location.href = 'tel:' + this.customerServicePhone;
}
},
<view @click="callPhone">电话</view>
customerServicePhone:'123456789'
callPhone() {
if (confirm('确定要拨打客服电话吗?电话号码为:' + this.customerServicePhone)) {
window.location.href = 'tel:' + this.customerServicePhone;
}
},