liukangdong
2024-07-29 26fb0b3e76f52212a2cef49a0bc0b94e7425880c
wechat_jiaxuan/components/disRealpic/index.js
@@ -18,7 +18,7 @@
    pageNum: 1,
    pageSize: 10,
    query: '',
    sortType: 'NORMAL',
    sortType: '',
    catalogCode: 'real_case'
  },
  attached() {
@@ -50,6 +50,10 @@
          total: res.data.total,
        })
      })
    },
    scrolltoupper() {
      this.setData({ pageNum: 1,datalist: [],total: 0})
      this.getList()
    },
    scrolltolower() {
      console.log('触底事件');
@@ -108,6 +112,10 @@
      if(item.openType == 'link'){
        wx.navigateTo({
          url: '/pages/webView/index?link=' + item.openContent,
          success: function(res) {
            // 通过eventChannel向被打开页面传送数据
            res.eventChannel.emit('acceptDataFromOpenerPage', { link: item.openContent})
          }
        })
      }
      if(item.openType == 'page'){
@@ -123,6 +131,14 @@
      const index = tagCodes.indexOf(code)
      
      if(index === -1){
        if(activeParam && activeParam.length > 0){
          activeParam.forEach(item => {
            const indexTemp = tagCodes.indexOf(item.labelValueCode)
            if(indexTemp > -1){
              tagCodes.splice(indexTemp, 1)
            }
          })
        }
        tagCodes.push(code)
        cateList[activeIndex].paramIndex = paramIndex
        cateList[activeIndex].paramName = activeParam[paramIndex].labelValueName
@@ -139,15 +155,17 @@
      const { cateList } = this.data
      cateList.forEach(item => {
        item.paramIndex = -1
        item.paramName = ''
        item.paramName = item.paramName || ''
      })
      this.setData({ tagCodes: [],activeParam: [],cateList,activeIndex: -1 })
    },
    bindblur() {
      this.setData({ pageNum: 1,dataList: [],total: 0})
      this.getList()
    },
    subParam() {
      this.setData({ activeParam: [] })
      this.setData({ pageNum: 1,activeIndex: -1,dataList: [],total: 0})
      this.getList()
    },
    changeShowParams(e){