// components/itemCard.js Component({ options: { styleIsolation: "apply-shared" }, /** * 组件的属性列表 */ properties: { item: Object }, /** * 组件的初始数据 */ data: { }, /** * 组件的方法列表 */ methods: { getPublisherInfo: function () { wx.navigateTo({ url: "/pages/publisher/publisher?id=" + this.properties.item.publisherId }) }, getActivityInfo: function () { wx.navigateTo({ url: "/pages/activity/activity?id=" + this.properties.item._id }) }, filterMsgType: function (e) { this.triggerEvent("filtermsgtype", { attr: this.properties.item.attribute[0] }) } } })