detail.js 2.2 KB

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