| | |
| | | const app = getApp() |
| | | Page({ |
| | | data: { |
| | | barHeight: '', |
| | | navBarHeight: '', |
| | | searchVal: '', |
| | | isWhite: false, |
| | | backUrl: null, |
| | | userInfo: {}, |
| | |
| | | }, |
| | | |
| | | onLoad(options) { |
| | | const systInfo = wx.getSystemInfoSync(); |
| | | const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息 |
| | | const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度 |
| | | this.setData({ |
| | | barHeight: systInfo.statusBarHeight, |
| | | navBarHeight: navBarHeight, |
| | | }); |
| | | if (options.backUrl) { |
| | | let backUrl = JSON.parse(decodeURIComponent(options.backUrl)); |
| | | if (backUrl.options) { |
| | |
| | | getBannerList() { |
| | | const list = [] |
| | | app.MG.resource.getItem({ |
| | | path: 'jsek_banner\\jsek_homeBanner', |
| | | path: 'jsek_banner\\jsek_homeBannerApplet', |
| | | fields: { jsek_link: [] }, |
| | | paging: { start: 0, size: 9 } |
| | | }).then(res => { |
| | |
| | | goDetail(e) { |
| | | const { book } = e.currentTarget.dataset; |
| | | wx.navigateTo({ |
| | | url: `/pages/bookServices/detail/index?id=${book.id}&name=${book.name}`, |
| | | url: `/packageBookService/pages/bookServices/detail/index?id=${book.id}&name=${book.name}`, |
| | | }); |
| | | }, |
| | | getShoppingCartList() { |
| | |
| | | console.log(e, 1) |
| | | if (type == "tushufuwu") { |
| | | wx.navigateTo({ |
| | | url: '/pages/bookServices/list/index' |
| | | url: '/packageBookService/pages/bookServices/list/index' |
| | | }) |
| | | } else { |
| | | wx.showToast({ |
| | |
| | | isWhite: e.scrollTop > 50 ? true : false |
| | | }) |
| | | |
| | | } |
| | | }, |
| | | onRetrievalPage() { |
| | | console.log(this.data.searchVal); |
| | | wx.navigateTo({ |
| | | url: '/pages/retrievalPage/index?searchVal=' + this.data.searchVal |
| | | |
| | | |
| | | }) |
| | | |
| | | |
| | | }, |
| | | |
| | | |
| | | }); |