| | |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | 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, |
| | | types: options.types |
| | | }) |
| | | |
| | | console.log(this.data.types); |
| | | |
| | | |
| | | // this.getBanner() |
| | | wx.setNavigationBarTitle({ |
| | | title: options.types == 'jsek_aboutUs' ? '关于我们' : '联系我们', |
| | | }) |
| | | this.getAboutText() |
| | | }, |
| | | |
| | |
| | | onShareAppMessage() { |
| | | |
| | | }, |
| | | //轮播图 |
| | | getBanner() { |
| | | app.MG.resource.getItem({ |
| | | path: 'jsek_banner\\jsek_aboutUsBanner', |
| | | paging: { |
| | | start: 0, |
| | | size: 9 |
| | | }, |
| | | fields: { |
| | | jsek_link: [] |
| | | } |
| | | }).then(res => { |
| | | this.setData({ |
| | | bannerList: res.datas[0].icon, |
| | | swiperList: res.datas[0].icon |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | //文字 jsek_aboutUs 关于我们 |
| | | //jsek_contactUs 联系我们 |
| | | getAboutText() { |
| | |
| | | width: 750 |
| | | }, |
| | | }).then(res => { |
| | | // console.log(res.datas[0].content); |
| | | |
| | | let modifiedContent = res.datas[0].content |
| | | modifiedContent = modifiedContent.replace(/<table/g, '<table class="table"').replace(/<tr/g, '<tr class="tr"').replace(/<td/g, '<td class="td"') |
| | | this.setData({ |
| | | aboutText: res.datas[0].content, |
| | | aboutText: modifiedContent, |
| | | loading: false, |
| | | hidden: false, |
| | | }) |
| | | |
| | | |
| | | }) |
| | | }, |
| | | goBack() { |