enter.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. var app = getApp();
  2. var wxh = require('../../utils/wxh.js');
  3. Page({
  4. /**
  5. * 页面的初始数据
  6. */
  7. data: {
  8. logo:'',
  9. name:'',
  10. url: app.globalData.urlImages,
  11. },
  12. /**
  13. * 生命周期函数--监听页面加载
  14. */
  15. onLoad: function (options) {
  16. app.setBarColor();
  17. this.getEnterLogo();
  18. if (options.scene){
  19. app.globalData.spid = options.scene;
  20. }
  21. },
  22. getEnterLogo:function(){
  23. var that = this;
  24. wx.request({
  25. url: app.globalData.url + '/routine/login/get_enter_logo',
  26. method: 'post',
  27. dataType  : 'json',
  28. success: function (res) {
  29. that.setData({
  30. logo: res.data.data.site_logo,
  31. name: res.data.data.site_name
  32. })
  33. }
  34. })
  35. },
  36. /**
  37. * 生命周期函数--监听页面初次渲染完成
  38. */
  39. onReady: function () {
  40. },
  41. getUserInfo: function () {
  42. app.getUserInfoEnter();
  43. },
  44. /**
  45. * 生命周期函数--监听页面显示
  46. */
  47. onShow: function () {
  48. },
  49. /**
  50. * 生命周期函数--监听页面隐藏
  51. */
  52. onHide: function () {
  53. },
  54. /**
  55. * 生命周期函数--监听页面卸载
  56. */
  57. onUnload: function () {
  58. },
  59. /**
  60. * 页面相关事件处理函数--监听用户下拉动作
  61. */
  62. onPullDownRefresh: function () {
  63. },
  64. /**
  65. * 页面上拉触底事件的处理函数
  66. */
  67. onReachBottom: function () {
  68. },
  69. /**
  70. * 用户点击右上角分享
  71. */
  72. onShareAppMessage: function () {
  73. }
  74. })