let app = getApp() Page({ /** * 页面的初始数据 */ data: { IMG_NAME: app.IMG_NAME }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { let that = this app.AjaxRequest('get', { 'content-type': 'application/json', 'Authorization': 'Bearer ' + app.Getopenid() }, '/activity/myList', { userId: wx.getStorageSync('userId') }, function (res) { that.setData({ list: res.rows }) }) }, navDetail(e) { let id = e.currentTarget.dataset.id wx.navigateTo({ url: '/pages/community/eventDetails/eventDetails?id=' + id }) } })