let app = getApp(); const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' var WxParse = require('../../wxParse/wxParse.js'); const config = require("../../config/config"); const Http = require("../../utils/HttpBasics"); const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} let configUrls = extConfig.attr.configUrl; console.log(configUrls) Page({ /** * 页面的初始数据 */ data: { navigationBarHeight, url: config.url, token: app.globalData.token, id:'', date:new Date() }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { const that = this; that.setData({ url: config.url, id:options.id, token: app.globalData.token }) wx.request({ url: configUrls + config.api.printHtmlById, data: { token: app.globalData.token, id: options.id, date: new Date() }, header: { 'content-type': 'application/html' }, success: function (res) { var temp = WxParse.wxParse('article', 'html',res.data, that, 5); } }) }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: function () { this.setData({ date:new Date() }) }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { }, })