yiming
2024-04-11 a9bd2df4da1cf7b198db7bf2d67ce8adbbe89b32
pages/bookExhibitionList/index.js
@@ -8,6 +8,8 @@
   * 页面的初始数据
   */
  data: {
    loading: true,
    hidden: true,
    totalSize: '',
    start: 0,
    isMore: null,
@@ -318,33 +320,42 @@
      //取消
      wx.hideLoading()
      // console.log(this.data.bookExhibitionList, '数据');
      this.setData({
        loading: false,
        hidden: false,
      })
    })
  },
  //重点项目接口
  keyProjectsGet(newPrice) {
    this.setData({
      loading: true,
      hidden: true,
    })
    // console.log(newPrice, 'newPrice');
    let parms = {
      refCodes: ['bookClassification']
    }
    app.MG.store.getProductTypeField(parms).then(res => {
      const checkData = JSON.parse(res[0].config)
      checkData.option.forEach(item => {
        if (newPrice == item.value) {
          this.setData({
            filteredItems: item.child || [] // 如果存在子项则赋值,否则赋值为空数组
          });
          // console.log(this.data.filteredItems);
        }
      })
      this.onLoad();
      this.setData({
        loading: false,
        hidden: false,
      })
    })
  },