index.js 683 B

123456789101112131415161718192021222324252627282930313233343536
  1. import reachBottom from '~/mixins/reachBottom';
  2. import {
  3. getSaleOrder
  4. } from '~/api/sale'
  5. Page({
  6. behaviors: [reachBottom],
  7. data: {
  8. currentIndex: 1,
  9. categoryList: [{
  10. id: 1,
  11. title: '全部'
  12. }, {
  13. id: 2,
  14. title: '已付款'
  15. }, {
  16. id: 3,
  17. title: '退单'
  18. }, ]
  19. },
  20. onLoad(options) {
  21. this.resetData();
  22. },
  23. loadMore() {
  24. this.getData(getSaleOrder, {
  25. });
  26. },
  27. setClass({
  28. currentTarget
  29. }) {
  30. this.setData({
  31. currentIndex: currentTarget.dataset.index,
  32. });
  33. this.resetData();
  34. },
  35. })