C端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 rivejä
828 B

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