aa
jiangping
2024-08-02 7dc29ed74ebaa8a0e66f68264d9a13f95dc3af21
wechat_jiaxuan/pages/consult/consult.js
@@ -35,11 +35,6 @@
      })
    }
  },
  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 })
@@ -62,6 +57,13 @@
  },
  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({