const app = getApp(); Component({ data: { imageUrl: getApp().globalData.imageUrl, bgImage: "background-image: url("+ getApp().globalData.imageUrl + "/sj_beijin.png)", questes: [] }, methods: { toEventDetail(value) { let id = value.currentTarget.dataset.id; wx.setStorageSync('sRele', id); wx.navigateTo({ url: "/pages/insight/pages/eventInsight/index" }) } }, lifetimes: { attached() { //页面数据 app.globalData.request({ action: 'getHotEventsList0528', sType: 'HotEvent', token: 't%2BrswgjvzGM=', sTimeType: '34', iPageIndex: 1, iPageSize: 10, iTimeType: 0, }).then(res => { this.setData({ questes: res }) }); }, }, })