| | |
| | | searchValue: '', |
| | | path: '', |
| | | pathList: [], |
| | | pageCount: { |
| | | page: 1, |
| | | total: 0, |
| | | }, |
| | | isMore: null, |
| | | assortCheck: { |
| | | name: '', |
| | | code: '', |
| | |
| | | */ |
| | | onReachBottom(e) { |
| | | console.log('底部'); |
| | | const flag = this.data.bookList.length < this.data.pageCount.total |
| | | if (flag) { |
| | | this.setData({ |
| | | isMore: true, |
| | | "pageCount.page": this.data.pageCount.page + 1 |
| | | }) |
| | | this.getBookList(this.data.path) |
| | | } else { |
| | | this.setData({ |
| | | isMore: true, |
| | | }) |
| | | setTimeout(() => { |
| | | this.setData({ |
| | | isMore: false |
| | | }) |
| | | }, 100) |
| | | console.log('没有更多了'); |
| | | } |
| | | }, |
| | | |
| | | /** |
| | |
| | | height: 145, |
| | | }, |
| | | paging: { |
| | | start: (this.data.page - 1) * 16, |
| | | size: 16, |
| | | start: 0, |
| | | size: this.data.pageCount.page * 8, |
| | | }, |
| | | fields: { |
| | | author: [], |
| | |
| | | app.MG.store.getProductList(query).then((res) => { |
| | | this.setData({ |
| | | bookList: res.datas, |
| | | enable: false |
| | | enable: false, |
| | | "pageCount.total": res.total |
| | | }); |
| | | console.log('图书列表', res, this.data.pageCount); |
| | | }); |
| | | }, |
| | | // 一级分类切换 |