收藏
回答

requestSubscribeDeviceMessage回调报错?

调用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,

              })

            }

          })

        }

      }

    })


回答关注问题邀请回答
收藏
登录 后发表内容
问题标签