Преглед изворни кода

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@1239 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d

suntg пре 10 година
родитељ
комит
3532e394c3
1 измењених фајлова са 10 додато и 1 уклоњено
  1. 10 1
      src/main/webapp/resources/js/register/registerApp.js

+ 10 - 1
src/main/webapp/resources/js/register/registerApp.js

@@ -249,11 +249,20 @@ define([ 'toaster', 'services' ,'ui.router', 'file-upload', 'file-upload-shim'],
 		$scope.setAdminPassword = function(enuu, psd) {
 			$scope.loadingShow = true;
 			$http.post('signup/setAdminPassword?enuu=' + enuu + '&password=' + psd).success(function(data){
+				console.log(data);
 				$scope.loadingShow = false;
 				$scope.setSuccess = true;
 				$scope.buttonDisabled = true;
+				if(data.result != null) {
+					$scope.saasUrl = data.result;
+				}
 				setTimeout(function() {//延迟3秒执行
-					window.location.href = window.location.href.replace('/signup', '');
+					console.log(data);
+					if($scope.saasUrl) {
+						window.location.href = "http://" + $scope.saasUrl + ".saas.ubtob.com";
+					} else {
+						window.location.href = window.location.href.replace('/signup', '/signin');
+					}
 				}, 3000);
 			}).error(function(data) {
 				$scope.loadingShow = false;