瀏覽代碼

登录按钮加判断

seimin 3 年之前
父節點
當前提交
397e6fc228
共有 3 個文件被更改,包括 8 次插入3 次删除
  1. 1 1
      assets/css/login.css
  2. 5 0
      assets/js/controllers/loginCtrl.js
  3. 2 2
      assets/views/login_login.html

+ 1 - 1
assets/css/login.css

@@ -54,7 +54,7 @@
54 54
     float: left;
55 55
 }
56 56
 .wt_btn{
57
-    width: 400px!important;
57
+    width: 400px;
58 58
     height: 52px;
59 59
     border-radius: 26px;
60 60
     background: #D1D1D1!important; 

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

@@ -2,6 +2,11 @@ app.controller('LoginCtrl', ['$rootScope', '$scope', '$state', '$translate', '$l
2 2
     function ($rootScope, $scope, $state, $translate, $localStorage, $cookieStore, $auth, $window, $document, $timeout, $filter, $http, cfpLoadingBar, Restangular, api_login, api_is_category, SweetAlert, api_msg) {
3 3
         $rootScope.app.layout.isNavbarFixed = false;
4 4
         $rootScope.app.layout.isSidebarFixed = false;
5
+        //判断项目归属 start
6
+        //因项目众多,前端为了加以区分,所以用域名加以判断,后期有更好的方式可以自行修改
7
+        // 中南财大
8
+        $rootScope.isZncd = document.domain === 'itsm.zuel.edu.cn';
9
+        //判断项目归属 end
5 10
         // 是否单点登录
6 11
         $scope.isSSo = location.search.length > 0;
7 12
         //初始化,获取版本类别,处理人/处理科室-seimin

+ 2 - 2
assets/views/login_login.html

@@ -119,8 +119,8 @@
119 119
                 </p> -->
120 120
                 <!-- wt -->
121 121
                 <p style="overflow:hidden">
122
-                    <button ng-click="handleLoginClick(loginForm)" class="btn-primary wt_btn fl" style="width: 48%!important;"> 登录 </button>
123
-                    <a href="http://itsm.zuel.edu.cn:8080/" class="btn-primary wt_btn fr" style="width: 48%!important;margin-top:30px;line-height:52px;"> 统一身份认证 </a>
122
+                    <button ng-style="{width:isZncd?'48%':'100%'}" ng-click="handleLoginClick(loginForm)" class="btn-primary wt_btn fl" style="width: 48%!important;"> 登录 </button>
123
+                    <a ng-if="isZncd" href="http://itsm.zuel.edu.cn:8080/" class="btn-primary wt_btn fr" style="width: 48%!important;margin-top:30px;line-height:52px;"> 统一身份认证 </a>
124 124
                 </p>
125 125
                 <!-- 激活码:<input type="text" ng-model="ceshilicense">   -->
126 126
                 <!-- <div class="col-xs-12">