lll
liukangdong
2024-07-21 4eaf6d8835d4e9b204f13d012f13bbd8a94a21cc
wechat_jiaxuan/components/disRealpic/index.js
@@ -4,7 +4,7 @@
   * 组件的属性列表
   */
  properties: {
    menuButtonInfo: Object
  },
  data: {
    activeIndex: -1,
@@ -45,8 +45,24 @@
      getZhongTaiRealcasePage({
        catalogCode,tagCodes,pageNum,pageSize, sortType,query
      }).then(res => {
        this.setData({ dataList: res.data.records })
        this.setData({
          dataList: [...this.data.dataList, ...res.data.records],
          total: res.data.total,
        })
      })
    },
    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'
        })
      }
    },
    videoClick(e) {
      const { videourl } = e.currentTarget.dataset
@@ -68,6 +84,7 @@
    statusChange(e) {
      const sortType = e.currentTarget.dataset.status
      this.setData({sortType})
      this.setData({ pageNum: 1,dataList: [],total: 0})
      this.getList()
    },
    handleAction(e){
@@ -114,6 +131,7 @@
        cateList[activeIndex].paramIndex = -1
        cateList[activeIndex].paramName = ''
      }
      this.setData({ pageNum: 1,dataList: [],total: 0})
      this.setData({ tagCodes, cateList })
      console.log('tagCodes', tagCodes);
    },