litian
2024-09-12 bbba5d26e9e26c910ed337dcb65f462752ee6dce
packageDomain/pages/sampleBookList/index.js
@@ -152,14 +152,17 @@
          // 获取申请次数
          that.getSelectPaperBookCount()
          that.getSelectBookCount()
        }
      })
    } else {
      that.setData({
        userInfo: JSON.parse(wx.getStorageSync(app.config.userInfoKey))
      })
      const paperBookList = wx.getStorageSync('paperBookList') ? JSON.parse(wx.getStorageSync('paperBookList')).length : 0
      const electronicBookList = wx.getStorageSync('electronicBookList') ? JSON.parse(wx.getStorageSync('electronicBookList')).length : 0
      this.setData({
        num: paperBookList + electronicBookList
      })
    }
  },
@@ -348,9 +351,6 @@
  // 获取图书列表
  getBookList(isReachBottom) {
    let that = this;
    this.setData({
      skeletonLoding: true
    })
    let sort;
    let pathObj = {};
    if (that.data.pathList.length) {
@@ -512,12 +512,14 @@
  //高级分类选择
  onChangeIcon(e) {
    this.setData({
      skeletonLoding: true,
      bookList: [],
      'assortCheck.code': e.detail.value,
      stairCode: '',
      secondCode: '',
      path: `${e.detail.value}`,
      'iconList.value': e.detail.value,
    });
    this.getBookList(false);
    this.getStairList(this.data.assortCheck.code);
@@ -529,6 +531,7 @@
      `${this.data.assortCheck.code}\\${e.detail.value}` :
      this.data.assortCheck.code;
    this.setData({
      skeletonLoding: true,
      bookList: [],
      pathList: [],
      stairCode: e.detail.value,
@@ -540,8 +543,8 @@
    this.getBookList(false);
    this.getSecondList(path);
  },
  // 二级分类切换
  onChangeSecond(e) {
  // 二级分类切换
  onConfirmSecond(e) {
    const pathList = [];
    for (let index = 0; index < e.detail.value.length; index++) {
      const element = e.detail.value[index];
@@ -552,17 +555,16 @@
      });
    }
    this.setData({
      skeletonLoding: true,
      pathList: pathList,
      'secondList.value': e.detail.value,
    });
  },
  //
  onConfirmSecond() {
    this.getBookList(false);
  },
  onResetSecond() {
    this.setData({
      skeletonLoding: true,
      pathList: [],
      'secondList.value': [],
    });
    this.getBookList(false);
@@ -951,7 +953,6 @@
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {
  }
  onShareAppMessage() {},
  onShareTimeline() {},
})