index.js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. // pages/login/login.js
  2. import WxValidate from '../../utils/wxValidate'
  3. const app = getApp()
  4. Page({
  5. /**
  6. * 页面的初始数据
  7. */
  8. data: {
  9. // 主体高度
  10. infoHeight: '',
  11. frameStyle: { useTop: true, name: '审核队员', leftArrow: true, useBar: false },
  12. list: [
  13. { id: '1', team: '我是第一队', time: '2020.01.20 08:30'},
  14. { id: '1', team: '我是第一队', time: '2020.01.20 08:30'},
  15. { id: '1', team: '我是第一队', time: '2020.01.20 08:30'},
  16. { id: '1', team: '我是第一队', time: '2020.01.20 08:30'}
  17. ]
  18. },
  19. back: function () {
  20. wx.navigateBack({ url: '/pages/me/index' })
  21. },
  22. /**
  23. * 生命周期函数--监听页面加载
  24. */
  25. onLoad: function (options) {
  26. // 计算高度
  27. this.searchHeight()
  28. },
  29. // 计算高度
  30. searchHeight: function () {
  31. let frameStyle = this.data.frameStyle;
  32. let client = app.globalData.client;
  33. // 减去状态栏
  34. let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
  35. // 是否减去底部菜单
  36. if (frameStyle.useBar) infoHeight = infoHeight - 50;
  37. if (infoHeight) this.setData({ infoHeight: infoHeight })
  38. },
  39. /**
  40. * 生命周期函数--监听页面初次渲染完成
  41. */
  42. onReady: function () {
  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. })