| | |
| | | * 组件的属性列表 |
| | | */ |
| | | properties: { |
| | | |
| | | menuButtonInfo: Object |
| | | }, |
| | | data: { |
| | | activeIndex: -1, |
| | |
| | | |
| | | cateList: [], |
| | | dataList: [], |
| | | total: 0, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | query: '', |
| | |
| | | catalogCode,pageNum,pageSize,tagCodes, sortType,query |
| | | }).then(res => { |
| | | if(res.data){ |
| | | this.setData({ dataList: res.data.records }) |
| | | this.setData({ |
| | | total: res.data.total, |
| | | dataList: [...this.data.dataList, ...res.data.records], |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | scrolltolower() { |
| | | console.log('触底事件'); |
| | | const { total, dataList, pageNum } = this.data |
| | | if(total > dataList.length){ |
| | | this.setData({ pageNum: pageNum + 1 }) |
| | | this.getList() |
| | | }else{ |
| | | wx.showToast({ |
| | | title: '暂无更多数据', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | statusChange(e) { |
| | | const sortType = e.currentTarget.dataset.status |
| | | this.setData({sortType}) |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | | handleAction(e){ |
| | |
| | | cateList[activeIndex].paramIndex = -1 |
| | | cateList[activeIndex].paramName = '' |
| | | } |
| | | this.setData({ pageNum: 1,dataList: [],total: 0}) |
| | | this.setData({ tagCodes, cateList }) |
| | | console.log('tagCodes', tagCodes); |
| | | }, |