let app = getApp() Component({ data: { state: false }, lifetimes: { attached() { let state = app.globalData.activityPop if (this.data.state != state) { this.setData({ state }) } }, }, methods: { close() { getApp().globalData.activityPop = false; this.setData({ state: false }) }, jumpDet() { this.close() wx.navigateTo({ url: '/pages/activityDet/index', }) } } })