| | |
| | | loadingProps: { |
| | | size: '50rpx', |
| | | }, |
| | | loading: false, |
| | | noData: false |
| | | }, |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom(e) { |
| | | console.log('底部'); |
| | | const flag = this.data.bookList.length < this.data.pageCount.total |
| | | if (flag) { |
| | | this.setData({ |
| | |
| | | }, |
| | | // 获取图书列表 |
| | | getBookList(path) { |
| | | this.setData({ |
| | | loading: true, |
| | | noData: false |
| | | }) |
| | | let sort; |
| | | let pathObj = {}; |
| | | if (this.data.pathList.length) { |
| | |
| | | this.setData({ |
| | | bookList: res.datas, |
| | | enable: false, |
| | | "pageCount.total": res.total |
| | | "pageCount.total": res.total, |
| | | loading: false |
| | | }); |
| | | console.log('图书列表', res, this.data.pageCount); |
| | | console.log('图书列表', res.datas); |
| | | if (!res.datas.length) { |
| | | this.setData({ |
| | | noData: true |
| | | }) |
| | | } |
| | | }); |
| | | }, |
| | | // 一级分类切换 |
| | |
| | | pathList: pathList, |
| | | 'secondList.value': e.detail.value, |
| | | }); |
| | | |
| | | }, |
| | | // |
| | | onConfirmSecond() { |