| | |
| | | loading: true |
| | | }, |
| | | onShow() { |
| | | this.setData({ |
| | | searchVal: "", |
| | | }); |
| | | console.log(this.data.searchVal) |
| | | this.loadHomePage(); |
| | | this.getBannerList() |
| | | |
| | |
| | | //点击目录 |
| | | 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) { |
| | | console.log(res.path, 2) |
| | | wx.redirectTo({ |
| | | url: '/' + res.path, |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | // 监听滚动条 |
| | | onScroll(e) { |
| | |
| | | } |
| | | } |
| | | }, |
| | | |
| | | isChange(data) { |
| | | this.setData({ |
| | | isWhite: data |