| | |
| | | const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息 |
| | | const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度 |
| | | this.setData({ |
| | | |
| | | navBarHeight: navBarHeight, |
| | | barHeight: systInfo.statusBarHeight, |
| | | searchVal: options.searchVal |
| | |
| | | //标签的切换 |
| | | onTabsChange(event) { |
| | | const value = event.detail.value |
| | | // if (this.data.bookData <= 0 || this.data.courseData <= 0 || this.data.digitalTextbooksData <= 0 || this.data.seminarData <= 0 || this.data.biblioClassificationData <= 0 || this.data.bookFairData <= 0) { |
| | | // this.setData({ |
| | | // isMore: true |
| | | // }) |
| | | // } |
| | | if (value === '0') { |
| | | this.setData({ |
| | | tabValue: value, |
| | | isMore: false |
| | | }) |
| | | |
| | | } else if (value === '1') { |
| | | console.log(value, 'tab'); |
| | | this.setData({ |
| | |
| | | method: 'post', |
| | | data: body |
| | | }).then((resp) => { |
| | | // console.log(resp); |
| | | console.log(resp, 'resp'); |
| | | |
| | | //图书 0 |
| | | const data1 = resp[0] |
| | |
| | | |
| | | |
| | | }) |
| | | wx.stopPullDownRefresh() |
| | | |
| | | |
| | | |
| | | }, |
| | | bibliographyGet() { |
| | |
| | | }) |
| | | |
| | | }) |
| | | wx.stopPullDownRefresh() |
| | | }, |
| | | downloadData(event) { |
| | | console.log(111); |
| | |
| | | url: '/pages/bookExhibitionDetails/index?id=' + item.id + '&bookName=' + item.name // 假设跳转到详情页面,并传递了id参数 |
| | | }); |
| | | }, |
| | | //触底函数 |
| | | onReachBottom() { |
| | | console.log("上拉加载...."); |
| | | }, |
| | | |
| | | //上拉函数 |
| | | onPullDownRefresh() { |
| | | console.log("下拉刷新..."); |
| | |
| | | |
| | | }, |
| | | |
| | | // 下拉函数 |
| | | onPullDownRefresh() { |
| | | |
| | | if (this.data.tabValue == 4) { |
| | | this.setData({ |
| | | "pageCount.page": 1 |
| | | }) |
| | | this.bibliographyGet() |
| | | } else { |
| | | this.setData({ |
| | | "pageCount.page": 1 |
| | | }) |
| | | this.retrievalPageGet() |
| | | } |
| | | |
| | | |
| | | |
| | | }, |
| | | }) |