import event from '~/mixins/event' import reachBottom from '~/mixins/reachBottom'; import { getSaleOrder } from '~/api/sale' Page({ behaviors: [reachBottom,event], data: { currentIndex: '', categoryList: [{ id: '', title: '全部' }, { id: 1, title: '已付款' }, { id: 2, title: '退单' }, ] }, onLoad(options) { this.resetData(); }, loadMore() { this.getData(getSaleOrder, { status: this.data.currentIndex }); }, setClass({ currentTarget }) { this.setData({ currentIndex: currentTarget.dataset.index, }); this.resetData(); }, })