yiming
2024-04-09 12cc87a1f2f9b91359d3ca43fe052440d9890dac
pages/home/home.js
@@ -75,7 +75,9 @@
  onPullDownRefresh() {
    this.setData({
      'baseRefresh.value': true,
      isWhite: false
    })
    this.getBannerList();
    this.init();
  },
  init() {
@@ -117,7 +119,17 @@
      })
    })
  },
  navToActivityDetail(e) {
    let {
      info
    } = e.currentTarget.dataset
    console.log(info)
    if (info.link) {
      wx.navigateTo({
        url: info.link,
      });
    }
  },
  loadHomePage() {
    fetchHome().then(({
@@ -239,6 +251,9 @@
  },
  tabChangeHandle(item) {
    let info = this.data.courseTypeList[item.detail.value]
    this.setData({
      courseList: []
    })
    this.getCourseList(info)
  },
  //图书服务分类
@@ -545,26 +560,20 @@
  // 监听滚动条
  onScroll(e) {
    console.log(e)
    this.setData({
      isWhite: true
    })
    if (e.detail.scrollTop == 0) {
      this.setData({
        isWhite: false
      })
    }
    // this.setData({
    //   isWhite: e.detail.scrollTop > 20 ? true : false
    // })
    this.setData({
      isWhite: e.detail.scrollTop > 20 ? true : false
    })
  },
  onScrollToTop(e) {
    this.setData({
      isWhite: e.detail.scrollTop > 50 ? true : false
    })
  },
  onRetrievalPage() {
    // 首页测试登录功能,后续注释