index.js 571 B

123456789101112131415161718192021222324252627282930313233
  1. Page({
  2. data: {
  3. currentIndex: 1,
  4. categoryList: [{
  5. id: 1,
  6. title: '全部'
  7. }, {
  8. id: 2,
  9. title: '7日'
  10. }, {
  11. id: 3,
  12. title: '月'
  13. }, {
  14. id: 4,
  15. title: '季'
  16. }, {
  17. id: 5,
  18. title: '半年'
  19. }]
  20. },
  21. onLoad(options) {
  22. },
  23. setClass({
  24. currentTarget
  25. }) {
  26. this.setData({
  27. currentIndex: currentTarget.dataset.index,
  28. });
  29. // this.resetData();
  30. },
  31. })