// components/itemCard.js const util = require('../../utils/util.js') Component({ options: { styleIsolation: 'apply-shared' }, /** * 组件的属性列表 */ properties: { item: Object }, /** * 组件的初始数据 */ data: { }, /** * 组件的方法列表 */ methods: { getPublisherInfo: function () { wx.navigateTo({ url: '/pages/publisher/publisher?id=' + this.data.item.pub_id }) }, getActivityInfo: function () { wx.navigateTo({ url: '/pages/activity/activity?id=' + this.data.item._id }) }, filterMsgType: function (e) { this.triggerEvent('filtermsgtype', { type: this.data.item.type }) }, filterTag: function (e) { this.triggerEvent('filtertag', { tag: e.currentTarget.dataset.tag }) } } })