报错如图![](https://img-blog.csdnimg.cn/8453a921bd5649dfa60b9a108c92b3f3.png?x-oss-process=image/watermark,type_d3F5LXplbmhlaQ,shadow_50,text_Q1NETiBA5aSn5aSn44CC,size_18,color_FFFFFF,t_70,g_se,x_16)
这是一个近期报出的错误 只需要在后面加上catch就可以解决这个报错
function callService(telephone) {
wx.makePhoneCall({
phoneNumber: telephone,
}).catch((e) => {
// console.log(e) //用catch(e)来捕获错误{makePhoneCall:fail cancel}
})
}
function callService(telephone) {
wx.makePhoneCall({
phoneNumber: telephone,
}).catch((e) => {
// console.log(e) //用catch(e)来捕获错误{makePhoneCall:fail cancel}
})
}