闫增涛
2024-04-30 dc934dfd63fecff84d0bf996418e041b9bd4ea59
pages/retrievalPage/index.js
@@ -39,14 +39,13 @@
      page: 1,
      total: 0,
    },
    tabValue: ''
    tabValue: '0'
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    console.log(app.config.appId);
    const systInfo = wx.getSystemInfoSync();
    const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息
@@ -56,17 +55,14 @@
      barHeight: systInfo.statusBarHeight,
      searchVal: options.searchVal
    })
    this.retrievalPageGet()
    this.bibliographyGet()
    let event = {
      detail: {
        value: "0"
      }
    }
    this.onTabsChange(event)
    // this.onTabsChange(event)
  },
  /**
@@ -133,17 +129,12 @@
  //标签的切换
  onTabsChange(event) {
    const value = event.detail.value
    // if (this.data.bookData <= 0 || this.data.courseData <= 0 || this.data.digitalTextbooksData <= 0 || this.data.seminarData <= 0 || this.data.biblioClassificationData <= 0 || this.data.bookFairData <= 0) {
    //   this.setData({
    //     isMore: true
    //   })
    // }
    console.log(value);
    if (value === '0') {
      this.setData({
        tabValue: value,
        isMore: false
      })
    } else if (value === '1') {
      console.log(value, 'tab');
      this.setData({
@@ -171,14 +162,9 @@
        isMore: false
      })
    }
  },
  retrievalPageGet() {
    let fields = {
      liveTime: [],
      lecturer: [],
@@ -579,6 +565,10 @@
    });
  },
  onSearchSubmit() {
    this.setData({
      loading: true,
      hidden: true,
    })
    console.log(this.data.searchVal);
    this.retrievalPageGet()
    this.bibliographyGet()
@@ -919,5 +909,5 @@
        }, 100)
      }
    }
  }
  },
})