| | |
| | | import { getCatalogList, getZhongTaiProductPage } from '../../api/index' |
| | | import { getCatalogList,getCataLogTagList, getZhongTaiProductPage } from '../../api/index' |
| | | Component({ |
| | | /** |
| | | * 组件的属性列表 |
| | | */ |
| | | properties: { |
| | | menuButtonInfo: Object |
| | | }, |
| | | |
| | | /** |
| | |
| | | datalist: [], |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | | query: '', |
| | | sortType: 'NORMAL', |
| | | catalogCode: "" |
| | |
| | | }, |
| | | getTag() { |
| | | const catalogCode = this.data.catalogCode |
| | | getCatalogList({ |
| | | getCataLogTagList({ |
| | | catalogCode |
| | | }) |
| | | }, |
| | |
| | | }) |
| | | }) |
| | | }, |
| | | 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' |
| | | }) |
| | | } |
| | | }, |
| | | cateClick(e) { |
| | | const catalogCode = e.currentTarget.dataset.code |
| | | this.setData({ catalogCode }) |
| | | this.setData({ pageNum: 1,datalist: [],total: 0}) |
| | | this.getTag() |
| | | this.getList() |
| | | }, |
| | | statusChange(e) { |
| | | const sortType = e.currentTarget.dataset.status |
| | | this.setData({sortType}) |
| | | this.setData({ pageNum: 1,datalist: [],total: 0}) |
| | | this.getList() |
| | | }, |
| | | handleDetail(e) { |