const app = getApp() Component({ data: { imageUrl: "../../../../images/uploadImg3.png" }, properties: { activityItemObj: { type: Object, value: {} }, actType: { type: String, value: "tab0" } }, lifetimes: { attached () { } }, pageLifetimes: { show () { } }, methods: { // 预览图片 previewImage (e) { app.globalData.previewImage = true wx.previewImage({ urls: [e.currentTarget.dataset.src] }) }, toDetail (e) { this.triggerEvent("toDetail", {detailId: e.currentTarget.dataset.detailid, actCurrentState: e.currentTarget.dataset.state}) } } })