angular.tabbar.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. 'enrol' : [ {
  19. text : '专业报考',
  20. url : 'enrol/guide',
  21. param : 'WeixinMenuEnrolGuide'
  22. }, {
  23. text : '已报专业',
  24. url : 'enrol/list'
  25. }, {
  26. text : '面试预约',
  27. url : 'appointment/list',
  28. param : 'WeixinMenuAppointment'
  29. }, {
  30. text : '准考证下载',
  31. url : 'ticket/list',
  32. param : 'WeixinMenuTicket'
  33. }, {
  34. text : '复试确认',
  35. url : 'reexam/list',
  36. param : 'WeixinMenuReExam'
  37. } ],
  38. 'score' : [ {
  39. text : '分数查询',
  40. url : 'score/list'
  41. }, {
  42. text : '核查申请',
  43. url : 'score/admit'
  44. }, {
  45. text : '合格证下载',
  46. url : 'quality/download'
  47. } ]
  48. }
  49. $scope.showMenu = function(name) {
  50. var array = [];
  51. angular.forEach($scope.FuncMap[name], function(m) {
  52. if (m.param == undefined || m.param == '' || $rootScope.getParamValue(m.param, 'InActive') == 'Active') {
  53. array.push({
  54. text : m.text,
  55. onClick : function() {
  56. $timeout(function() {
  57. $location.path('app/' + m.url);
  58. }, 100);
  59. }
  60. });
  61. }
  62. });
  63. $.actions({
  64. actions : array
  65. });
  66. }
  67. } ]);