angular.tabbar.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. text : '核查申请',
  51. url : 'score/admit'
  52. }, {
  53. text : '合格证下载',
  54. url : 'quality/download'
  55. } ]
  56. }
  57. $scope.showMenu = function(name) {
  58. var array = [];
  59. angular.forEach($scope.FuncMap[name], function(m) {
  60. if (m.param == undefined || m.param == '' || $rootScope.getParamValue(m.param, 'InActive') == 'Active') {
  61. array.push({
  62. text : m.text,
  63. onClick : function() {
  64. $timeout(function() {
  65. $location.path('app/' + m.url);
  66. }, 100);
  67. }
  68. });
  69. }
  70. });
  71. $.actions({
  72. actions : array
  73. });
  74. }
  75. } ]);