C端小程序
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

42 行
1.0 KiB

  1. // pages/index/sw/index.js
  2. Component({
  3. /**
  4. * 组件的属性列表
  5. */
  6. properties: {
  7. paramAtoB: String,
  8. from: String,
  9. data: {
  10. value: {},
  11. type: Object
  12. },
  13. },
  14. /**
  15. * 组件的初始数据
  16. */
  17. data: {},
  18. methods: {
  19. gotoDetail(e) {
  20. console.log(e.currentTarget.dataset.couponid);
  21. console.log(e.currentTarget.dataset.title);
  22. console.log(e.currentTarget.dataset.id);
  23. let couponId = e.currentTarget.dataset.couponid;
  24. let title = e.currentTarget.dataset.title;
  25. let id = e.currentTarget.dataset.id;
  26. let targetAd = e.currentTarget.dataset.targetad;
  27. if (targetAd) {
  28. }
  29. if (id && targetAd != 7) {
  30. wx.navigateTo({
  31. url: `/pages/coupon/detail/index?couponChannelId=${id}&couponId=${couponId}&title=${title}`,
  32. })
  33. } else if (targetAd == 7) {
  34. wx.navigateTo({
  35. url: `/pages/spellGroup/mySpellGroup/index?couponChannelId=${id}&couponId=${couponId}&title=${title}`,
  36. })
  37. }
  38. }
  39. }
  40. });