''
liukangdong
2024-07-26 865b229e81373facf6d6e5d050f4f45532b80621
wechat_jiaxuan/components/disProduct/index.js
@@ -31,7 +31,7 @@
    if(app.globalData.catalogCode){
      this.setData({ catalogCode: app.globalData.catalogCode })
      setTimeout(() => {
        console.log('catalogCode', this.data.catalogCode);
        console.log('catalogCode', this.data.catalogCode)
        getApp().globalData.catalogCode = ''
      }, 2000)
    }
@@ -80,7 +80,7 @@
      })
    },
    scrolltolower() {
      console.log('触底事件');
      console.log('触底事件')
      const { total, datalist, pageNum } = this.data
      if(total > datalist.length){
        this.setData({ pageNum: pageNum + 1 })
@@ -120,8 +120,8 @@
      const paramIndex = e.currentTarget.dataset.index
      const { secondCateList, tagCodes, activeParam, activeIndex } = this.data
      const index = tagCodes.indexOf(code)
      console.log('code', code);
      console.log('tagCodes', tagCodes);
      console.log('code', code)
      console.log('tagCodes', tagCodes)
      if(index === -1){
        // 同param里code重复
        if(activeParam && activeParam.length > 0){
@@ -145,8 +145,8 @@
    changeShowParams(e){
      const { secondCateList } = this.data
      const activeIndex = e.currentTarget.dataset.index
      console.log('activeIndex', activeIndex);
      console.log('secondCateList', secondCateList);
      console.log('activeIndex', activeIndex)
      console.log('secondCateList', secondCateList)
      if(activeIndex === this.data.activeIndex){
        this.setData({ activeIndex: -1, activeParam: [] })
      }else{
@@ -161,13 +161,13 @@
      const { secondCateList } = this.data
      secondCateList.forEach(item => {
        item.paramIndex = -1
        item.paramName = ''
        item.paramName = item.paramName || ''
      })
      this.setData({ tagCodes: [],activeParam: [],secondCateList,activeIndex: -1 })
    },
    subParam() {
      this.setData({ activeParam: [] })
      this.setData({ pageNum: 1,datalist: [],total: 0})
      this.setData({ pageNum: 1, activeIndex: -1, datalist: [], total: 0 })
      this.getList()
    },
  }