menu.js 2.8 KB

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