packageBookService/pages/bookServices/list/index.js
@@ -34,10 +34,32 @@
      options: [],
      disabled: false,
    },
    disabledSecondList: false,
    majorProjectList: {
      value: [],
      options: [],
    },
    sortList: {
      value: '',
      options: [{
          value: '',
          label: '综合排序',
        }, {
          value: '1',
          label: '名称正序'
        },
        {
          value: '2',
          label: '名称倒叙'
        },
        {
          value: '3',
          label: '出版时间正序'
        },
        {
          value: '3',
          label: '出版时间倒叙'
        }
      ],
    },
    newTextBook: {
      value: [],
@@ -54,6 +76,11 @@
    noData: false,
    showDropdown: false,
    isRequesting: false,
    disabledStair: false,
    disabledSecondList: false,
    disabledProject: false,
    disabledNewForms: false,
    triggered: false,
  },
  /**
   * 生命周期函数--监听页面加载
@@ -135,7 +162,13 @@
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {
    console.log('下拉');
    this.setData({
      triggered: true
    })
    this.setData({
      'pageCount.page': 1
    })
    this.getBookList(this.data.path);
  },
  /**
@@ -173,6 +206,9 @@
  },
  // 获取一级列表
  getStairList(path) {
    this.setData({
      disabledStair: false
    })
    const query = {
      path,
      filterList: [],
@@ -202,6 +238,11 @@
        'stairList.options': options,
        'stairList.value': this.data.stairCode,
      });
      if (!options.length) {
        this.setData({
          disabledStair: true
        })
      }
    });
  },
  // 获取一级分类下二级分类
@@ -239,6 +280,10 @@
  },
  // 获取重点项目
  getProjectList(type) {
    this.setData({
      disabledProject: false,
      disabledNewForms: false
    })
    const options = [];
    const arr = [];
    let array = [];
@@ -264,6 +309,11 @@
            label: element.name,
          });
        }
        if (!options.length) {
          this.setData({
            disabledProject: true
          })
        }
        this.setData({
          'majorProjectList.options': options,
        });
@@ -274,6 +324,11 @@
            value: element.value,
            label: element.name,
          });
        }
        if (!options.length) {
          this.setData({
            disabledNewForms: true
          })
        }
        this.setData({
          'newTextBook.options': options,
@@ -367,6 +422,14 @@
          })
        }
      }
      if (this.data.triggered) {
        this.setData({
          triggered: false
        })
        wx.showToast({
          title: '刷新成功',
        })
      }
    });
  },
  // 一级分类切换
@@ -429,6 +492,12 @@
    });
    this.getBookList(this.data.path);
  },
  // 排序切换
  onSortChange(e) {
    this.setData({
      'sortList.value': e.detail.value
    })
  },
  changeNewText(e) {
    this.setData({
      'newTextBook.value': e.detail.value,