const app = getApp() Component({ data: { userState: '', completeInfoDialogVisible: false }, properties: { commandAssociationList: { type: Array, value: [] }, noDataVisible: { type: Boolean, value: true } }, lifetimes: { attached () { this.setData({ userState: app.globalData.infoCompleted }) } }, methods: { joinAssocition (e) { if (this.data.userState == 0 || this.data.userState == 4) { this.setData({ completeInfoDialogVisible: !this.data.completeInfoDialogVisible }) } else { wx.navigateTo({ url: `/subpages/association/pages/joinassociation/joinassociation?type=join&id=${e.currentTarget.dataset.id}` }) } }, previewImage (e) { app.globalData.previewImage = true wx.previewImage({ urls: [e.currentTarget.dataset.src] }) } } })