menu.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. // pages/student/menu/menu.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. userInfo: '',
  8. menuStudent: [{
  9. 'title': '人脸自助',
  10. imagename: 'facephoto',
  11. left: '#fec38f',
  12. right: '#ff8980'
  13. },
  14. {
  15. 'title': '访客申请',
  16. imagename: 'application',
  17. left: '#bdc1ff',
  18. right: '#ac8efd'
  19. },
  20. {
  21. 'title': '通行记录',
  22. imagename: 'pass',
  23. left: '#9fd9fc',
  24. right: '#7abcf2'
  25. },
  26. {
  27. 'title': '考勤统计',
  28. imagename: 'statistics',
  29. left: '#ffca93',
  30. right: '#fdb957'
  31. }
  32. ],
  33. listStudent: [{
  34. 'title': '报修服务',
  35. nav: 'baoxiu'
  36. },
  37. {
  38. 'title': '快递物流',
  39. nav: 'kuaidi'
  40. },
  41. {
  42. 'title': '投诉建议',
  43. nav: 'tousu',
  44. url: 'proposal',
  45. status: true
  46. },
  47. {
  48. 'title': '问卷调查',
  49. nav: 'diaocha'
  50. }
  51. ],
  52. menuTeacher: [{
  53. 'title': '人脸自助',
  54. imagename: 'facephoto',
  55. left: '#fec38f',
  56. right: '#ff8980'
  57. },
  58. {
  59. 'title': '访客审核',
  60. imagename: 'visitorcheck',
  61. left: '#bdc1ff',
  62. right: '#ac8efd'
  63. },
  64. {
  65. 'title': '通行记录',
  66. imagename: 'pass',
  67. left: '#9fd9fc',
  68. right: '#7abcf2'
  69. },
  70. {
  71. 'title': '考勤统计',
  72. imagename: 'statistics',
  73. left: '#ffca93',
  74. right: '#fdb957'
  75. }
  76. ],
  77. listTeacher: [{
  78. 'title': '预警提醒',
  79. nav: 'yujing-2',
  80. url: 'warning',
  81. Url: 'warning'
  82. }, {
  83. 'title': '报表管理',
  84. nav: 'baobiaoguanli'
  85. }, {
  86. 'title': '投诉建议',
  87. nav: 'tousu',
  88. url: 'suggestion',
  89. Url: 'list'
  90. }, {
  91. 'title': '报修管理',
  92. nav: 'baoxiu'
  93. }]
  94. },
  95. check: function(e) {
  96. console.log(e)
  97. if (e.currentTarget.dataset.status) {
  98. return false
  99. }
  100. wx.showToast({
  101. title: '模块开发中',
  102. icon: 'none'
  103. })
  104. },
  105. /**
  106. * 生命周期函数--监听页面加载
  107. */
  108. onLoad: function(options) {
  109. const that = this;
  110. let userInfo = wx.getStorageSync('user');
  111. that.setData({
  112. userInfo: userInfo
  113. })
  114. },
  115. /**
  116. * 生命周期函数--监听页面初次渲染完成
  117. */
  118. onReady: function() {
  119. },
  120. /**
  121. * 生命周期函数--监听页面显示
  122. */
  123. onShow: function() {
  124. },
  125. /**
  126. * 生命周期函数--监听页面隐藏
  127. */
  128. onHide: function() {
  129. },
  130. /**
  131. * 生命周期函数--监听页面卸载
  132. */
  133. onUnload: function() {
  134. },
  135. /**
  136. * 页面相关事件处理函数--监听用户下拉动作
  137. */
  138. onPullDownRefresh: function() {
  139. },
  140. /**
  141. * 页面上拉触底事件的处理函数
  142. */
  143. onReachBottom: function() {
  144. },
  145. /**
  146. * 用户点击右上角分享
  147. */
  148. onShareAppMessage: function() {
  149. }
  150. })