index.js 805 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // pages/match/index.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. // true是人气榜,false是参赛作品
  8. currentType: true,
  9. bannerList: [{
  10. id: 1,
  11. url: "https://efunimgs.ai160.com/xyyf/banner/voucher.png"
  12. }, {
  13. id: 2,
  14. url: "https://efunimgs.ai160.com/xyyf/banner/course.png"
  15. }, {
  16. id: 3,
  17. url: "https://efunimgs.ai160.com/xyyf/banner/video.png"
  18. }, {
  19. id: 4,
  20. url: "https://efunimgs.ai160.com/xyyf/banner/topic.png"
  21. }]
  22. },
  23. /**
  24. * 生命周期函数--监听页面加载
  25. */
  26. onLoad(options) {
  27. },
  28. bannelEvent() {},
  29. selectType({
  30. target
  31. }) {
  32. if (target.dataset.type) {
  33. this.setData({
  34. currentType: JSON.parse(target.dataset.type)
  35. })
  36. }
  37. },
  38. onShareAppMessage() {
  39. }
  40. })