修改订阅消息通知

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

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

Loading…
Cancel
Save