C端小程序
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

46 řádky
853 B

  1. // pages/index/sw/index.js
  2. const imgurl = require("../../utils/imgurl");
  3. Component({
  4. /**
  5. * 组件的属性列表
  6. */
  7. properties: {
  8. list: {
  9. value: [],
  10. type: Array
  11. }
  12. },
  13. /**
  14. * 组件的初始数据
  15. */
  16. data: {
  17. swiperCurrent: 0,
  18. bannerUrl: imgurl.banner.url
  19. },
  20. /**
  21. * 组件的方法列表
  22. */
  23. ready() {},
  24. methods: {
  25. swiperChange: function(e) {
  26. this.setData({
  27. swiperCurrent: e.detail.current
  28. });
  29. },
  30. gotobannerdetail: function(e) {
  31. console.log(e)
  32. if(e.currentTarget.dataset.data.type==2){
  33. wx.navigateTo({
  34. url: `/pages/freeBannerDetail/index?id=${e.currentTarget.dataset.id}`
  35. });
  36. }else{
  37. wx.navigateTo({
  38. url: `/pages/bannerdetail/index?id=${e.currentTarget.dataset.id}`
  39. });
  40. }
  41. }
  42. }
  43. });