| | |
| | | }) |
| | | } |
| | | }, |
| | | onPullDownRefresh: function () { |
| | | console.log('下拉刷新'); |
| | | this.setData({ dataList: [], pageNum: 1, total: 0 }) |
| | | this.getList() |
| | | }, |
| | | getCate() { |
| | | getCatalogList({catalogCode: 'product_info'}).then(res => { |
| | | this.setData({ category: res.data }) |
| | |
| | | }, |
| | | itemClick(e) { |
| | | const item = e.currentTarget.dataset.item |
| | | const { dataList } = this.data |
| | | dataList.forEach(ite => { |
| | | if(item.id === ite.id){ |
| | | ite.viewCount += 1 |
| | | } |
| | | }) |
| | | this.setData({ dataList }) |
| | | actionDo({actionType: 'view',id: item.id}) |
| | | if(item.contentType == 'link'){ |
| | | wx.navigateTo({ |