修改订阅消息通知

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

@ -364,23 +364,8 @@
//
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({
tmplIds: 1,
tmplIds: ['oUvaCPeeOg4wH6HTvCcSabU6FnzXUXOBXsqBYAPOV-U'],
success (res) {
console.log(res)
},
@ -388,9 +373,25 @@
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() {

Loading…
Cancel
Save