C端小程序
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.1 KiB

  1. // pages/freeBannerDetail/index.js
  2. let app = getApp();
  3. const config = require("../../config/config");
  4. Page({
  5. /**
  6. * 页面的初始数据
  7. */
  8. data: {
  9. url: config.url,
  10. token: app.globalData.token,
  11. id:'',
  12. date:new Date()
  13. },
  14. /**
  15. * 生命周期函数--监听页面加载
  16. */
  17. onLoad: function (options) {
  18. console.log(config.url)
  19. this.setData({
  20. url: config.url,
  21. id:options.id,
  22. token: app.globalData.token
  23. })
  24. },
  25. /**
  26. * 生命周期函数--监听页面初次渲染完成
  27. */
  28. onReady: function () {
  29. },
  30. /**
  31. * 生命周期函数--监听页面显示
  32. */
  33. onShow: function () {
  34. this.setData({
  35. date:new Date()
  36. })
  37. },
  38. /**
  39. * 生命周期函数--监听页面隐藏
  40. */
  41. onHide: function () {
  42. },
  43. /**
  44. * 生命周期函数--监听页面卸载
  45. */
  46. onUnload: function () {
  47. },
  48. /**
  49. * 页面相关事件处理函数--监听用户下拉动作
  50. */
  51. onPullDownRefresh: function () {
  52. },
  53. /**
  54. * 页面上拉触底事件的处理函数
  55. */
  56. onReachBottom: function () {
  57. },
  58. })