// 点击一键呼叫
haddleCall() {
let _this = this
if (_this.phoneNumber.length > 1) {
wx.showActionSheet({
itemList: _this.phoneNumber,
success(res) {
// console.log("reasss",res)
_this.phoneNumber.forEach((item, index) => {
if (res.tapIndex == index) {
wx.makePhoneCall({
phoneNumber: item,
success: function () {
console.log('拨打电话成功' + item)
},
fail: function () {
console.log('拨打电话失败')
},
})
}
})
},
fail(res) {
// console.log("拨打电话失败")
},
})
}
},
微信小程序一键呼叫(电话可以多个,用户选一个)
最新推荐文章于 2024-07-31 11:41:46 发布