Page({ data: { notifyChecked: false, }, onLoad() {}, onShow() {}, handleBack() { wx.navigateBack() }, toggleNotify() { const notifyChecked = !this.data.notifyChecked this.setData({ notifyChecked }) if (notifyChecked) { wx.showToast({ title: '已开启上线通知', icon: 'none' }) } }, handleNotify() { if (!this.data.notifyChecked) { this.setData({ notifyChecked: true }) wx.showToast({ title: '已开启上线通知', icon: 'none' }) } }, }) export {}