修改订阅消息通知

yj-dev
杨杰 3 years ago
parent b8364e1fbb
commit ac940c5561
  1. 55
      pages/tabBar/home/home.vue

@ -364,33 +364,34 @@
// //
openMsg() { openMsg() {
var that = this uni.requestSubscribeMessage({
// tmplIds: ['oUvaCPeeOg4wH6HTvCcSabU6FnzXUXOBXsqBYAPOV-U'],
wx.getSetting({ success (res) {
withSubscriptions:true, //false console.log(res)
success(res) { },
if(res.authSetting['scope.subscribeMessage'] || res.authSetting['scope.subscribeMessage'] == undefined) { // fail:(res) => {
uni.openSetting({ // console.log(res)
success(res) { }
console.log(res.authSetting) })
}, // var that = this
fail(err) { // //
console.log(err) // wx.getSetting({
} // withSubscriptions:true, //false
}); // success(res) {
}else { // // if(res.authSetting['scope.subscribeMessage'] || res.authSetting['scope.subscribeMessage'] == undefined) { //
uni.requestSubscribeMessage({ // uni.openSetting({ //
tmplIds: 1, // success(res) {
success (res) { // console.log(res.authSetting)
console.log(res) // },
}, // fail(err) {
fail:(res) => { // console.log(err)
console.log(res) // }
} // });
}) // }else { //
}
} // }
}) // }
// })
}, },
// //
getCmsContent() { getCmsContent() {

Loading…
Cancel
Save