let app = getApp() import { actionRecord } from '~/api/global' 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 }) }, async jumpDet() { await actionRecord({ action: 'NEW_YEAR_ACTIVITY_BANNER' }) this.close() wx.navigateTo({ url: '/pages/activityList/index', }) } } })