angular.tabbar.js 1.6 KB

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