itemCard.js 767 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // components/itemCard.js
  2. Component({
  3. options: {
  4. styleIsolation: "apply-shared"
  5. },
  6. /**
  7. * 组件的属性列表
  8. */
  9. properties: {
  10. item: Object
  11. },
  12. /**
  13. * 组件的初始数据
  14. */
  15. data: {
  16. },
  17. /**
  18. * 组件的方法列表
  19. */
  20. methods: {
  21. getPublisherInfo: function () {
  22. wx.navigateTo({
  23. url: "/pages/publisher/publisher?id=" + this.properties.item.publisherId
  24. })
  25. },
  26. getActivityInfo: function () {
  27. wx.navigateTo({
  28. url: "/pages/activity/activity?id=" + this.properties.item._id
  29. })
  30. },
  31. filterMsgType: function (e) {
  32. this.triggerEvent("filtermsgtype", {
  33. attr: this.properties.item.attribute[0]
  34. })
  35. }
  36. }
  37. })