闫增涛
2024-03-22 88d80c9f40935c6ce7ea51683c6cdc1a80d1997b
pages/bookExhibitionList/index.js
@@ -8,6 +8,7 @@
   * 页面的初始数据
   */
  data: {
    keynoteDisabled: true,
    value: '',
    keyword: '',
    nameSort: null,
@@ -49,9 +50,7 @@
          price: 'jsek_teacherEducation',
          label: '教师教育',
        },
      ],
    },
    multipleSelect: {
      value: [],
@@ -68,33 +67,7 @@
    * 生命周期函数--监听页面加载
    */
  onLoad(options) {
    // 获取屏幕高度
    wx.getSystemInfo({
      success: function (res) {
        // this.setData({
        //   windowHeight: res.windowHeight
        // })
        // 获取节点的类名
        var query = wx.createSelectorQuery();
        query.select('.assembleContent').boundingClientRect();
        query.exec(function (res) {
          // console.log(res, 'res');
          let node = res[0];
          node.setStyle({
            backgroundColor: '#0256b9',
          })
          // // 修改节点样式
          // if (node) {
          //   node.setStyle({
          //     backgroundColor: 'red',
          //     color: 'white'
          //   });
          // }
        });
      }
    });
    // console.log(this.data.filteredItems, 88888);
    const systInfo = wx.getSystemInfoSync();
@@ -114,18 +87,18 @@
    if (this.data.filteredItems = []) {
      console.log(11111);
      singleSelectOptions.push({
        label: '禁用选项',
        value: 'disabled',
        disabled: true,
      });
    }
    // singleSelectOptions.push({
    //   label: '禁用选项',
      //   label: '暂无数据',
    //   value: 'disabled',
    //   disabled: true,
    // });
    } else {
      console.log(7889);
    }
    // 更新数据
@@ -300,6 +273,18 @@
    const newValue = e.detail.value;
    const selectedOption = this.data.product.options.find(option => option.value === newValue);
    const newPrice = selectedOption ? selectedOption.price : null;
    console.log(newValue, 'newValue');
    console.log(newPrice, 'newPrice');
    if (newPrice) {
      this.setData({
        keynoteDisabled: false
      })
    } else {
      this.setData({
        keynoteDisabled: true
      })
    }
    this.setData({
      'product.value': newValue,
      'product.price': newPrice, // 将选中的 price 值保存在数据中
@@ -330,6 +315,7 @@
    });
  },
  handleConfirm(event) {
    const { value } = event.detail;
    // 确认操作的处理逻辑
@@ -369,8 +355,6 @@
    this.data.nameSort = 'Desc'
    // console.log('sssssss');
    this.bookExhibitionGet()
  },
  onBookExhibitionDetails: function (event) {
    const item = event.currentTarget.dataset.item;