|
@@ -21,6 +21,18 @@ Page({
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad(options) {
|
|
|
+ let that = this
|
|
|
+ wx.getSetting({
|
|
|
+ withSubscriptions: true,
|
|
|
+ success (res) {
|
|
|
+ console.log(res.subscriptionsSetting)
|
|
|
+ if(res.subscriptionsSetting.itemSettings['aGohosyMWmBOdzkjlD34qMRIsAPb2cVY6juinVIevgg'] == 'accept'){
|
|
|
+ that.setData({
|
|
|
+ dySign: false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
request({
|
|
|
url: '/event/page?page=1&limit=9999',
|
|
|
method: 'GET'
|
|
@@ -59,16 +71,6 @@ Page({
|
|
|
|
|
|
},
|
|
|
dy(){
|
|
|
- let that = this
|
|
|
- // wx.getSetting({
|
|
|
- // withSubscriptions: true,
|
|
|
- // success (res) {
|
|
|
- // console.log(res.subscriptionsSetting)
|
|
|
- // if(res.subscriptionsSetting.itemSettings['aGohosyMWmBOdzkjlD34qMRIsAPb2cVY6juinVIevgg'] == 'accept'){
|
|
|
- // console.log('用户已经订阅');
|
|
|
- // }
|
|
|
- // }
|
|
|
- // })
|
|
|
wx.requestSubscribeMessage({
|
|
|
tmplIds: ['aGohosyMWmBOdzkjlD34qMRIsAPb2cVY6juinVIevgg'],
|
|
|
success (res) {
|