litian
2024-03-12 b125d3ea74d61fb8e4d7238c83906aeea52c6b4c
pages/bookExhibitionDetails/index.js
@@ -6,18 +6,34 @@
   * 页面的初始数据
   */
  data: {
    bookName: null,
    bookBeginDate: null,
    bookCreator: null,
    bookContent: null,
    bookImage: null,
    bookExhibitionList: []
    bookName: '',
    bookBeginDate: '',
    bookCreator: '',
    bookContent: '',
    bookImage: '',
    bookExhibitionList: [],
    navBarHeight: '',
    barHeight: '',
    bookName: ''
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    const systInfo = wx.getSystemInfoSync();
    const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息
    const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度
    this.setData({
      navBarHeight: navBarHeight,
      barHeight: systInfo.statusBarHeight,
    })
    console.log();
    this.setData({
      bookName: options.bookName
    })
    const passId = options.id
@@ -131,6 +147,9 @@
    // wx.navigateTo({
    //   url: '/pages/bookExhibitionDetails/index?id?name=' + item.id + item.name // 假设跳转到详情页面,并传递了id参数
    // });
  }
  },
  goBack() {
    wx.navigateBack();
  },
})