| | |
| | | onLoad(options) { |
| | | this.getList() |
| | | }, |
| | | onPullDownRefresh: function () { |
| | | console.log('下拉刷新'); |
| | | this.setData({ dataList: [], page: 1, total: 0 }) |
| | | this.getList() |
| | | }, |
| | | onReachBottom() { |
| | | console.log('触底事件'); |
| | | const { total, dataList, page } = this.data |
| | |
| | | type: activeTabs |
| | | },page,capacity |
| | | }).then(res => { |
| | | this.setData({ |
| | | dataList: res.data.records, |
| | | total: res.data.total, |
| | | }) |
| | | if(res.data && res.data.records){ |
| | | const temp = res.data.records.map(item => { |
| | | if(item.budget > 10000){ |
| | | item.budget = (item.budget / 10000).toFixed(2) + '万' |
| | | } |
| | | return item |
| | | }) |
| | | this.setData({ |
| | | dataList: [ ...this.data.dataList, ...temp ], |
| | | total: res.data.total, |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | tabsChange(e) { |