seimin 3 年之前
父节点
当前提交
cd16279b71
共有 1 个文件被更改,包括 5 次插入25 次删除
  1. 5 25
      assets/js/controllers/loginCtrl.js

+ 5 - 25
assets/js/controllers/loginCtrl.js

@@ -68,11 +68,7 @@ app.controller('LoginCtrl', ['$rootScope', '$scope', '$state', '$translate', '$l
68 68
         $scope.licensePassSub = function () {
69 69
             if ($scope.licenseIsAdmin) {
70 70
                 $scope.licensePassShow = false;
71
-                if ($scope.isSSo) {
72
-                    location.href = 'http://' + document.domain + '/#/login/license';
73
-                } else {
74
-                    $state.go('login.license');
75
-                }
71
+                $state.go('login.license');
76 72
             } else {
77 73
                 $scope.licensePassShow = false;
78 74
             }
@@ -80,27 +76,15 @@ app.controller('LoginCtrl', ['$rootScope', '$scope', '$state', '$translate', '$l
80 76
         $scope.licenseSoonShowSub = function () {
81 77
             $scope.licenseSoonShow = false;
82 78
             $rootScope.getpending();
83
-            if ($scope.isSSo) {
84
-                location.href = 'http://' + document.domain + '/#/app/dashboard';
85
-            } else {
86
-                $state.go('app.dashboard');
87
-            }
79
+            $state.go('app.dashboard');
88 80
         }
89 81
         $scope.licenseTrialSub = function () {
90 82
             $scope.licenseTrialShow = false;
91 83
             $rootScope.getpending();
92
-            if ($scope.isSSo) {
93
-                location.href = 'http://' + document.domain + '/#/app/dashboard';
94
-            } else {
95
-                $state.go('app.dashboard');
96
-            }
84
+            $state.go('app.dashboard');
97 85
         }
98 86
         $scope.licenseTrialActivation = function () {
99
-            if ($scope.isSSo) {
100
-                location.href = 'http://' + document.domain + '/#/login/license';
101
-            } else {
102
-                $state.go('login.license');
103
-            }
87
+            $state.go('login.license');
104 88
         }
105 89
         $scope.licenseIsAdmin = "";
106 90
 
@@ -487,11 +471,7 @@ app.controller('LoginCtrl', ['$rootScope', '$scope', '$state', '$translate', '$l
487 471
                                         if (resp.data && resp.data.user && resp.data.user.id) {
488 472
                                             // console.log(resp.error);
489 473
                                             $rootScope.getpending();
490
-                                            if ($scope.isSSo) {
491
-                                                location.href = 'http://' + document.domain + '/#/app/dashboard';
492
-                                            } else {
493
-                                                $state.go('app.dashboard');
494
-                                            }
474
+                                            $state.go('app.dashboard');
495 475
                                             $rootScope.app.isLoginFixed = false;
496 476
                                             // console.log(resp);
497 477
                                             // api_wechatfile.getDictionary({ "type": "list", "key": "hjzx_cornet" }).then(function(data) {