index.js 938 B

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