50 lines
1.2 KiB
JavaScript
50 lines
1.2 KiB
JavaScript
// template/wechatAlertsPop/wechatAlertsPop.js
|
|
import util from '../../utils/util'
|
|
let app = getApp()
|
|
Component({
|
|
/**
|
|
* 组件的属性列表
|
|
*/
|
|
properties: {
|
|
capsulePopState: Boolean
|
|
},
|
|
|
|
/**
|
|
* 组件的初始数据
|
|
*/
|
|
data: {
|
|
reminderState: false, // 不再提醒的状态
|
|
},
|
|
|
|
/**
|
|
* 组件的方法列表
|
|
*/
|
|
methods: {
|
|
// 点击关闭微信提醒
|
|
cutCapsulePop() {
|
|
this.setData({
|
|
capsulePopState: !this.data.capsulePopState
|
|
})
|
|
app.globalData['iswechatmessagepush'] = 1
|
|
},
|
|
|
|
// 点击不再提醒
|
|
cutReminderSate() {
|
|
this.setData({
|
|
reminderState: !this.data.reminderState
|
|
})
|
|
util.wxpost("/miniprogram/user/rejectPopup").then(res => {})
|
|
},
|
|
|
|
// 点击微信提醒的立即开启
|
|
goReminder() {
|
|
wx.navigateTo({
|
|
url: '/pagesLoginRequired/pages/wechatReminder/wechatReminder',
|
|
})
|
|
this.setData({
|
|
capsulePopState: false
|
|
})
|
|
app.globalData['iswechatmessagepush'] = 1
|
|
}
|
|
}
|
|
}) |