yiming
2024-02-29 9f1e740e07085a7fc74defe5d63bcc4818aab69e
pages/bookExhibitionList/index.js
@@ -8,6 +8,8 @@
   * 页面的初始数据
   */
  data: {
    value: '',
    keyword: '',
    nameSort: null,
    total: null,
    page: {
@@ -17,7 +19,6 @@
    keynoteValue: null,
    filteredItems: [],
    newValue: null,
    value: '',
    bookExhibitionList: [],
    sorter: {
      value: 'default',
@@ -138,7 +139,10 @@
    wx.showLoading({
      title: '加载中...',
    })
    let searchObj = {
      'Name*': this.data.keyword,
      '||subtitle*': this.data.keyword
    }
    // console.log(this.data.keynoteValue);
    let sort = {
      Name: this.data.nameSort || 'Desc'
@@ -149,7 +153,8 @@
      queryType: '*',
      fields: {
        jsek_link: [],
        'bookClassification*': this.data.keynoteValue || []
        'bookClassification*': this.data.keynoteValue || [],
        ...searchObj
      },
      paging: this.data.page,
      sort: sort,
@@ -304,5 +309,13 @@
    wx.navigateTo({
      url: '/pages/bookExhibitionDetails/index?id=' + item.id // 假设跳转到详情页面,并传递了id参数
    });
  },
  // 搜索框
  onSearchSubmit(e) {
    this.setData({
      keyword: e.detail.value
    })
    console.log(this.data.keyword, 'keyword');
    this.bookExhibitionGet()
  }
})