index.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. // pages/login/login.js
  2. import WxValidate from '../../utils/wxValidate'
  3. const app = getApp()
  4. Page({
  5. /**
  6. * 页面的初始数据
  7. */
  8. data: {
  9. src: '/image/team.png',
  10. frameStyle: { useTop: true, name: '我的团队', leftArrow: false, useBar: true },
  11. // 主体高度
  12. infoHeight: '',
  13. list: [
  14. {
  15. id: '1', head: '/image/head1.png', group: '哈拉海队', time: '08:30', date: '2022.01.15', person: '10',Founder:'XXX'
  16. },
  17. {
  18. id: '1', head: '/image/head1.png', group: '哈拉海队', time: '08:30', date: '2022.01.15', person: '10',Founder:'XXX'
  19. },
  20. {
  21. id: '1', head: '/image/head1.png', group: '哈拉海队', time: '08:30', date: '2022.01.15', person: '10',Founder:'XXX'
  22. },
  23. {
  24. id: '1', head: '/image/head1.png', group: '哈拉海队', time: '08:30', date: '2022.01.15', person: '10',Founder:'XXX'
  25. },
  26. ],
  27. },
  28. tabPath(e) {
  29. let query = e.detail.detail;
  30. if (query) wx.redirectTo({ url: `/pages/${query}/index` })
  31. },
  32. tiao: function () {
  33. wx.navigateTo({
  34. url: '/pages/team/examine',
  35. })
  36. },
  37. jump: function () {
  38. wx.navigateTo({
  39. url: '/pages/team/apply',
  40. })
  41. },
  42. /**
  43. * 生命周期函数--监听页面加载
  44. */
  45. onLoad: function (options) {
  46. // 计算高度
  47. this.searchHeight()
  48. },
  49. // 计算高度
  50. searchHeight: function () {
  51. let frameStyle = this.data.frameStyle;
  52. let client = app.globalData.client;
  53. // 减去状态栏
  54. let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
  55. // 是否减去底部菜单
  56. if (frameStyle.useBar) infoHeight = infoHeight - 50;
  57. if (infoHeight) this.setData({ infoHeight: infoHeight })
  58. },
  59. /**
  60. * 生命周期函数--监听页面初次渲染完成
  61. */
  62. onReady: function () {
  63. },
  64. /**
  65. * 生命周期函数--监听页面显示
  66. */
  67. onShow: function () {
  68. },
  69. /**
  70. * 生命周期函数--监听页面隐藏
  71. */
  72. onHide: function () {
  73. },
  74. /**
  75. * 生命周期函数--监听页面卸载
  76. */
  77. onUnload: function () {
  78. },
  79. /**
  80. * 页面相关事件处理函数--监听用户下拉动作
  81. */
  82. onPullDownRefresh: function () {
  83. },
  84. /**
  85. * 页面上拉触底事件的处理函数
  86. */
  87. onReachBottom: function () {
  88. },
  89. /**
  90. * 用户点击右上角分享
  91. */
  92. onShareAppMessage: function () {
  93. }
  94. })