| | |
| | | }); |
| | | console.log(this.data.searchVal) |
| | | this.loadHomePage(); |
| | | this.getBannerList() |
| | | |
| | | }, |
| | | |
| | | onLoad() { |
| | | this.getBannerList() |
| | | const systInfo = wx.getSystemInfoSync(); |
| | | const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息 |
| | | const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度 |
| | |
| | | //点击目录 |
| | | toPages(item) { |
| | | let info = item.target.dataset.info |
| | | console.log(info); |
| | | if (info.url) { |
| | | if (info.text == "图书服务") { |
| | | wx.switchTab({ |
| | |
| | | |
| | | }, |
| | | |
| | | // 扫一扫 |
| | | onIconScanTap() { |
| | | wx.scanCode({ |
| | | success(res) { |
| | | console.log(res); |
| | | if (res.errMsg == "scanCode:ok" && res.path || res.result) { |
| | | let path = res.path || res.result |
| | | wx.redirectTo({ |
| | | url: '/' + path, |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | // 监听滚动条 |
| | | onScroll(e) { |