是
订阅消息拒绝后,如何引导用户打开订阅?[代码]wx.requestSubscribeMessage({[代码][代码] [代码][代码]tmplIds: [publishProductTempId],[代码][代码] [代码][代码]success(res) {[代码][代码] [代码][代码]if (res[publishProductTempId]=='accept') {[代码][代码] [代码][代码]// 这里将订阅的课程信息调用云函数存入db[代码][代码] [代码][代码]wx.cloud[代码][代码] [代码][代码].callFunction({[代码][代码] [代码][代码]name: 'sendTemplateMsg',[代码][代码] [代码][代码]data: {},[代码][代码] [代码][代码]})[代码][代码] [代码][代码].then(() => {[代码][代码] [代码][代码]console.log("用户接受成功")[代码][代码] [代码][代码]// this.saveProductInfo()[代码][代码] [代码][代码]})[代码][代码] [代码][代码].catch(() => {[代码][代码] [代码][代码]console.log("用户接受失败????失联???先订阅又取关了??")[代码][代码] [代码][代码]});[代码][代码] [代码] [代码] [代码][代码]}else if(res[publishProductTempId]=='reject'){[代码][代码] [代码][代码]console.log("用户拒绝订阅该条消息,引导用户打开授权设置")[代码][代码] [代码][代码]}else if(res[publishProductTempId]=='ban'){[代码][代码] [代码][代码]console.log("被微信办了")[代码][代码] [代码][代码]}[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail(e){[代码][代码] [代码][代码]console.log("失败回调:",e)[代码][代码] [代码][代码]console.log("用户拒绝订阅该小程序所有订阅消息,引导用户打开授权设置")[代码][代码] [代码][代码]}[代码][代码] [代码][代码]});[代码]requestSubscribeMessage.fail 可以作为判断用户拒绝订阅的判断依据?errCode都有几个值??? 订阅消息的授权不是应该也出现wx.getSetting 获取用户当前的授权状态 接口中???
2021-05-09