Error: MiniProgramError {“errMsg”:“makePhoneCall:fail cancel”}
解决办法
let phoneNumber = e.currentTarget.dataset.phone
wx.makePhoneCall({
phoneNumber
}).catch((e) => {
// console.log(e) //用catch(e)来捕获错误{makePhoneCall:fail cancel}
})
小程序解决报错getLocation:fail the api need to be declared in the requiredPrivateInfos field in app.json
解决办法
app.json
{
"permission": {
"scope.userLocation": {
"desc": "用于获取附近的维修点位置"
}
},
"requiredPrivateInfos": ["getLocation", "chooseLocation"]
}