index.js 957 B

123456789101112131415161718192021222324252627282930313233343536
  1. // components/goodList/index.js
  2. Component({
  3. properties: {
  4. status: {
  5. type: String,
  6. value: 0,
  7. },
  8. bastList: {
  9. type: Object,
  10. value: [],
  11. }
  12. },
  13. data: {
  14. },
  15. methods: {
  16. /**
  17. * 商品详情跳转
  18. */
  19. goDetail: function (e) {
  20. let item = e.currentTarget.dataset.items
  21. if (item.activity && item.activity.type === "1") {
  22. wx.navigateTo({
  23. url: `/pages/activity/goods_seckill_details/index?id=${item.activity.id}&time=${item.activity.time}&status=1`
  24. });
  25. } else if (item.activity && item.activity.type === "2") {
  26. wx.navigateTo({ url: `/pages/activity/goods_bargain_details/index?id=${item.activity.id}`});
  27. } else if (item.activity && item.activity.type === "3") {
  28. wx.navigateTo({
  29. url: `/pages/activity/goods_combination_details/index?id=${item.activity.id}`
  30. });
  31. } else {
  32. wx.navigateTo({ url: `/pages/goods_details/index?id=${item.id}` });
  33. }
  34. },
  35. }
  36. })