menu.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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. Url:'proposal',
  46. status: true
  47. },
  48. {
  49. 'title': '问卷调查',
  50. nav: 'diaocha'
  51. }
  52. ],
  53. menuTeacher: [{
  54. 'title': '人脸自助',
  55. imagename: 'facephoto',
  56. left: '#fec38f',
  57. right: '#ff8980'
  58. },
  59. {
  60. 'title': '访客审核',
  61. imagename: 'visitorcheck',
  62. left: '#bdc1ff',
  63. right: '#ac8efd'
  64. },
  65. {
  66. 'title': '通行记录',
  67. imagename: 'pass',
  68. left: '#9fd9fc',
  69. right: '#7abcf2'
  70. },
  71. {
  72. 'title': '考勤统计',
  73. imagename: 'statistics',
  74. left: '#ffca93',
  75. right: '#fdb957'
  76. }
  77. ],
  78. listTeacher: [{
  79. 'title': '预警提醒',
  80. nav: 'yujing-2',
  81. url: 'warning',
  82. Url: 'warning'
  83. }, {
  84. 'title': '报表管理',
  85. nav: 'baobiaoguanli'
  86. }, {
  87. 'title': '投诉建议',
  88. nav: 'tousu',
  89. url: 'suggestion',
  90. Url: 'list'
  91. }, {
  92. 'title': '报修管理',
  93. nav: 'baoxiu'
  94. }]
  95. },
  96. check: function(e) {
  97. console.log(e)
  98. if (e.currentTarget.dataset.status) {
  99. return false
  100. }
  101. wx.showToast({
  102. title: '模块开发中',
  103. icon: 'none'
  104. })
  105. },
  106. /**
  107. * 生命周期函数--监听页面加载
  108. */
  109. onLoad: function(options) {
  110. const that = this;
  111. let userInfo = wx.getStorageSync('user');
  112. that.setData({
  113. userInfo: userInfo
  114. })
  115. },
  116. /**
  117. * 生命周期函数--监听页面初次渲染完成
  118. */
  119. onReady: function() {
  120. },
  121. /**
  122. * 生命周期函数--监听页面显示
  123. */
  124. onShow: function() {
  125. },
  126. /**
  127. * 生命周期函数--监听页面隐藏
  128. */
  129. onHide: function() {
  130. },
  131. /**
  132. * 生命周期函数--监听页面卸载
  133. */
  134. onUnload: function() {
  135. },
  136. /**
  137. * 页面相关事件处理函数--监听用户下拉动作
  138. */
  139. onPullDownRefresh: function() {
  140. },
  141. /**
  142. * 页面上拉触底事件的处理函数
  143. */
  144. onReachBottom: function() {
  145. },
  146. /**
  147. * 用户点击右上角分享
  148. */
  149. onShareAppMessage: function() {
  150. }
  151. })