闫增涛
2024-04-30 dc934dfd63fecff84d0bf996418e041b9bd4ea59
pages/retrievalPage/index.js
@@ -11,6 +11,8 @@
   * 页面的初始数据
   */
  data: {
    loading: true,
    hidden: true,
    input: '',
    dialogKey: '',
    showWithInput: false,
@@ -37,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(); // 胶囊信息
@@ -54,17 +55,14 @@
      barHeight: systInfo.statusBarHeight,
      searchVal: options.searchVal
    })
    this.retrievalPageGet()
    this.bibliographyGet()
    let event = {
      detail: {
        value: "0"
      }
    }
    this.onTabsChange(event)
    // this.onTabsChange(event)
  },
  /**
@@ -131,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({
@@ -169,14 +162,9 @@
        isMore: false
      })
    }
  },
  retrievalPageGet() {
    let fields = {
      liveTime: [],
      lecturer: [],
@@ -492,7 +480,10 @@
        biblioClassificationTotal: data5.totalCount
      })
      this.setData({
        loading: false,
        hidden: false,
      })
    })
@@ -574,6 +565,10 @@
    });
  },
  onSearchSubmit() {
    this.setData({
      loading: true,
      hidden: true,
    })
    console.log(this.data.searchVal);
    this.retrievalPageGet()
    this.bibliographyGet()
@@ -914,5 +909,5 @@
        }, 100)
      }
    }
  }
  },
})