index.js 636 B

1234567891011121314151617181920212223242526272829303132
  1. // pages/purchased-content/index.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. tabs: ['全部奖励','已领取', '已失效'],
  8. testImg: '../../../imgs/testImg/thumbSmallImg2.jpg',
  9. avatar: '../../../imgs/testImg/1.jpg',
  10. activeIndex: 0,
  11. loading: false,
  12. loadMore: false
  13. },
  14. to_search: function () {
  15. wx.navigateTo({
  16. url: '../reward_detail/index',
  17. success: function (res) { },
  18. fail: function (res) { },
  19. complete: function (res) { },
  20. })
  21. },
  22. tabClick: function (e) {
  23. this.setData({
  24. loading: true,
  25. activeIndex: e.currentTarget.id
  26. });
  27. },
  28. });