Browse Source

登录跳转不加链接默认跳转至首页

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@4303 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
suntg 10 years ago
parent
commit
0869019336
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/main/webapp/resources/js/signin/app.js

+ 3 - 2
src/main/webapp/resources/js/signin/app.js

@@ -54,6 +54,7 @@ define([ 'toaster', 'ui.bootstrap', 'services' ], function() {
 			}
 			return url;
 		};
+		// 自动登录
 		var loginAndRedirect = function() {
 			var path = $location.path();
 			if(path) {
@@ -61,11 +62,11 @@ define([ 'toaster', 'ui.bootstrap', 'services' ], function() {
 				angular.forEach(params, function(param){
 					param && _params.push(param);
 				});
-				if(_params.length == 4 && _params[0] == 'redirect') {
+				if(_params.length > 2 && _params[0] == 'redirect') {
 					$scope.login({
 						j_username: _params[1],
 						j_password: _params[2]
-					}, decodeUrl(_params[3]));
+					}, decodeUrl(_params[3] || '/'));
 				}
 			}
 		};