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.

39 lines
667 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. },
  18. /**
  19. * 组件的方法列表
  20. */
  21. ready() {},
  22. methods: {
  23. swiperChange: function(e) {
  24. this.setData({
  25. swiperCurrent: e.detail.current
  26. });
  27. },
  28. gotobannerdetail: function(e) {
  29. console.log("我要点击进入banner详情页面");
  30. console.log(e.currentTarget.dataset.id);
  31. wx.navigateTo({
  32. url: `/pages/bannerdetail/index?id=${e.currentTarget.dataset.id}`
  33. });
  34. }
  35. }
  36. });