小程序联系客服 需要拨打电话,
在 安卓 会直接跳转到拨号界面,所以需要写一个弹框,但是在 ios 会自带一个弹框,就导致双弹框问题。
所以就验证是不是 ios,时 ios 的话直接调用 api,不用显示ui模板了,
let isIphone = app.globalData.systemInfo.model.search('iPhone') != -1 ? true : false
if(isIphone) {
let servicePhone = index
wx.makePhoneCall({
phoneNumber: servicePhone
})
}else {
this.setData({
[`services[0].name`]: '客服电话:' + index,
servicePhone: index,
show2: true
})
}