C端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 line
1.5 KiB

  1. let app = getApp();
  2. var WxParse = require('../../wxParse/wxParse.js');
  3. const config = require("../../config/config");
  4. const Http = require("../../utils/HttpBasics");
  5. Page({
  6. /**
  7. * 页面的初始数据
  8. */
  9. data: {
  10. url: config.url,
  11. token: app.globalData.token,
  12. id:'',
  13. date:new Date()
  14. },
  15. /**
  16. * 生命周期函数--监听页面加载
  17. */
  18. onLoad: function (options) {
  19. const that = this;
  20. that.setData({
  21. url: config.url,
  22. id:options.id,
  23. token: app.globalData.token
  24. })
  25. wx.request({
  26. url: 'https://ciformall.youlane.cn/C/api' + config.api.printHtmlById,
  27. data: {
  28. token: app.globalData.token,
  29. id: options.id,
  30. date: new Date()
  31. },
  32. header: {
  33. 'content-type': 'application/html'
  34. },
  35. success: function (res) {
  36. var temp = WxParse.wxParse('article', 'html',res.data, that, 5);
  37. }
  38. })
  39. },
  40. /**
  41. * 生命周期函数--监听页面初次渲染完成
  42. */
  43. onReady: function () {
  44. },
  45. /**
  46. * 生命周期函数--监听页面显示
  47. */
  48. onShow: function () {
  49. this.setData({
  50. date:new Date()
  51. })
  52. },
  53. /**
  54. * 生命周期函数--监听页面隐藏
  55. */
  56. onHide: function () {
  57. },
  58. /**
  59. * 生命周期函数--监听页面卸载
  60. */
  61. onUnload: function () {
  62. },
  63. /**
  64. * 页面相关事件处理函数--监听用户下拉动作
  65. */
  66. onPullDownRefresh: function () {
  67. },
  68. /**
  69. * 页面上拉触底事件的处理函数
  70. */
  71. onReachBottom: function () {
  72. },
  73. })