angular.tabbar.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. app.controller('TabbarCtrl', [ '$rootScope', '$scope', '$timeout', '$location', function($rootScope, $scope, $timeout, $location) {
  2. $scope.FuncMap = {
  3. 'me' : [ {
  4. text : '个人信息',
  5. url : 'std/info'
  6. }, {
  7. text : '报考材料',
  8. url : 'std/material',
  9. param : 'WeixinMenuMaterial'
  10. } ],
  11. 'help' : [ {
  12. text : '解除绑定',
  13. url : 'std/unbinding'
  14. }
  15. // {
  16. // text : '我的证件',
  17. // url : 'std/cert'
  18. // },
  19. // , {
  20. // text : '操作手册',
  21. // url : 'doc/optr'
  22. // }, {
  23. // text : '常见问题',
  24. // url : 'doc/program'
  25. // }
  26. ],
  27. 'enrol' : [ {
  28. text : '专业报考',
  29. url : 'enrol/guide',
  30. param : 'WeixinMenuEnrolGuide'
  31. }, {
  32. text : '已报专业',
  33. url : 'enrol/list'
  34. }, {
  35. text : '面试预约',
  36. url : 'appointment/list',
  37. param : 'WeixinMenuAppointment'
  38. }, {
  39. text : '准考证下载',
  40. url : 'ticket/list',
  41. param : 'WeixinMenuTicket'
  42. }, {
  43. text : '复试确认',
  44. url : 'reexam/list',
  45. param : 'WeixinMenuReExam'
  46. } ],
  47. 'score' : [ {
  48. text : '分数查询',
  49. url : 'score/list'
  50. }
  51. /**
  52. , {
  53. text : '核查申请',
  54. url : 'score/admit'
  55. }, {
  56. text : '合格证下载',
  57. url : 'quality/download'
  58. } **/]
  59. }
  60. $scope.showMenu = function(name) {
  61. var array = [];
  62. angular.forEach($scope.FuncMap[name], function(m) {
  63. if (m.param == undefined || m.param == '' || $rootScope.getParamValue(m.param, 'InActive') == 'Active') {
  64. array.push({
  65. text : m.text,
  66. onClick : function() {
  67. $timeout(function() {
  68. $location.path('app/' + m.url);
  69. }, 100);
  70. }
  71. });
  72. }
  73. });
  74. $.actions({
  75. actions : array
  76. });
  77. }
  78. } ]);