index.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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: true, useBar: false },
  10. // 主体高度
  11. infoHeight: '',
  12. singledate: '2018-09-01',
  13. time: '12:01',
  14. form: {
  15. team_id: '1',// 团队id
  16. team_name: '团队名称', // 团队名称
  17. apply_time: '2022-03-22',// 申请时间
  18. apply_user: '申请人',// 申请人
  19. apply_id: '1',// 申请人id
  20. },
  21. },
  22. bindDateChange3: function (e) {
  23. console.log('picker发送选择改变,携带值为', e.detail.value)
  24. this.setData({
  25. singledate: e.detail.value
  26. })
  27. },
  28. bindTimeChange: function (e) {
  29. console.log('picker发送选择改变,携带值为', e.detail.value)
  30. this.setData({
  31. time: e.detail.value
  32. })
  33. },
  34. // 时间段选择
  35. bindDateChange(e) {
  36. let that = this;
  37. console.log(e.detail.value)
  38. that.setData({
  39. date: e.detail.value,
  40. })
  41. },
  42. bindDateChange2(e) {
  43. let that = this;
  44. that.setData({
  45. date2: e.detail.value,
  46. })
  47. },
  48. back: function () {
  49. wx.navigateBack({ url: '/pages/home/index' })
  50. },
  51. /**
  52. * 生命周期函数--监听页面加载
  53. */
  54. onLoad: function (options) {
  55. // 计算高度
  56. this.searchHeight()
  57. },
  58. // 计算高度
  59. searchHeight: function () {
  60. let frameStyle = this.data.frameStyle;
  61. let client = app.globalData.client;
  62. // 减去状态栏
  63. let infoHeight = client.windowHeight - (client.statusBarHeight + client.getMenu.height + (client.getMenu.top - client.statusBarHeight) * 2);
  64. // 是否减去底部菜单
  65. if (frameStyle.useBar) infoHeight = infoHeight - 50;
  66. if (infoHeight) this.setData({ infoHeight: infoHeight })
  67. },
  68. /**
  69. * 生命周期函数--监听页面初次渲染完成
  70. */
  71. onReady: function () {
  72. },
  73. /**
  74. * 生命周期函数--监听页面显示
  75. */
  76. onShow: function () {
  77. },
  78. /**
  79. * 生命周期函数--监听页面隐藏
  80. */
  81. onHide: function () {
  82. },
  83. /**
  84. * 生命周期函数--监听页面卸载
  85. */
  86. onUnload: function () {
  87. },
  88. /**
  89. * 页面相关事件处理函数--监听用户下拉动作
  90. */
  91. onPullDownRefresh: function () {
  92. },
  93. /**
  94. * 页面上拉触底事件的处理函数
  95. */
  96. onReachBottom: function () {
  97. },
  98. /**
  99. * 用户点击右上角分享
  100. */
  101. onShareAppMessage: function () {
  102. }
  103. })