index.js 961 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. var app = getApp();
  2. Component({
  3. properties: {
  4. benefit: {
  5. type: Object,
  6. value: [],
  7. }
  8. },
  9. data: {
  10. },
  11. ready: function () {
  12. },
  13. attached: function () {
  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. })