| | |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | 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() |
| | | this.getAboutText() |
| | | }, |
| | |
| | | width: 750 |
| | | }, |
| | | }).then(res => { |
| | | console.log(res); |
| | | |
| | | // console.log(res.datas[0].content); |
| | | // let modifiedContent = `<div class="richTextBox">${res.datas[0].content}</div>`; |
| | | let modifiedContent = res.datas[0].content |
| | | // modifiedContent = modifiedContent.replace(/\<table/gi, '<table class="aboutUs-rich-table"').replace(/\<td/gi, '<table class="aboutUs-rich-td"').replace(/\<tr/gi, '<tr class="aboutUs-rich-tr"').replace(/\<p/gi, '<p class="aboutUs-rich-p"') |
| | | this.setData({ |
| | | aboutText: res.datas[0].content, |
| | | aboutText: modifiedContent, |
| | | loading: false, |
| | | hidden: false, |
| | | }) |
| | | |
| | | |
| | | }) |
| | | }, |
| | | goBack() { |