调用wx.requestSubscribeDeviceMessage回调报错。
requestSubscribeDeviceMessage:fail data unknow error code
wx.showModal({
title: '提示',
content: '开启故障推送通知',
success(res){
if(res.confirm){
wx.requestSubscribeDeviceMessage({
sn: '862211047339494',
snTicket: that.data.sn_ticket,
modelId: "xxxxxxxxxxxxxx",
tmplIds: templateId,
success(res) {
console.log('[wx.requestSubscribeDeviceMessage success]: ', res)
wx.showToast({
title: '订阅成功',
icon:'success'
})
},
fail(res) {
console.log('[wx.requestSubscribeDeviceMessage fail]: ', res)
wx.showModal({
content: ""+res.errMsg,
})
}
})
}
}
})