|
|
@@ -564,13 +564,30 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
/**
|
|
|
* 机构入驻选择
|
|
|
*/
|
|
|
+ app.controller('SelectInstitutionsNatureCtrl', ['$scope', 'toaster', 'Organization', '$location', 'AuthenticationService',
|
|
|
+ function ($scope, toaster, Organization, $location, AuthenticationService) {
|
|
|
app.controller('SelectInstitutionsNatureCtrl', ['$scope', 'toaster', 'Organization', '$location', 'BaseService', '$rootScope',
|
|
|
function ($scope, toaster, Organization, $location, BaseService, $rootScope) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
$rootScope.tree = 'user';
|
|
|
$rootScope.thief = 'newOrg';
|
|
|
// 获取当前账户注册机构情况
|
|
|
- Organization.getByUuid({uuid : 222222}, {}, function(data) {//10041558
|
|
|
+ AuthenticationService.getAuthentication().success(function (data) {
|
|
|
+ if (data.content) {
|
|
|
+ $scope.userUU = data.content.userUU;
|
|
|
+
|
|
|
+ Organization.getByUuid({uuid : $scope.userUU}, {}, function(data) {//10041558
|
|
|
+ $scope.org = data;
|
|
|
+ }, function() {
|
|
|
+ toaster.pop('error', '注册情况加载失败');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (data == null || !data.content) {
|
|
|
+ //$scope.isAuthed = false;
|
|
|
+ AuthenticationService.redirectSignin();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ Organization.getByUuid({uuid : $scope.userUU}, {}, function(data) {//10041558
|
|
|
$scope.org = data;
|
|
|
}, function() {
|
|
|
toaster.pop('error', '注册情况加载失败');
|
|
|
@@ -694,6 +711,8 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
BaseService.scrollBackToTop();
|
|
|
$rootScope.tree = 'user';
|
|
|
$rootScope.thief = 'newOrg';
|
|
|
+ app.controller('CertificationStep0Ctrl', ['$scope', 'toaster', 'Organization', '$location', 'AuthenticationService',
|
|
|
+ function ($scope, toaster, Organization, $location, AuthenticationService) {
|
|
|
$scope.checked = true;
|
|
|
$scope.changeChecked = function() {
|
|
|
$scope.checked = !$scope.checked;
|
|
|
@@ -710,19 +729,32 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
}
|
|
|
|
|
|
// 获取当前账户注册机构情况
|
|
|
- Organization.getByUuid({uuid : 222222}, {}, function(data) {//10041558
|
|
|
- if (typeof data.id == 'undefined') {
|
|
|
- return;
|
|
|
+ AuthenticationService.getAuthentication().success(function (data) {
|
|
|
+ if (data.content) {
|
|
|
+ $scope.userUU = data.content.userUU;
|
|
|
+
|
|
|
+ Organization.getByUuid({uuid : $scope.userUU}, {}, function(data) {//10041558
|
|
|
+ if (typeof data.id == 'undefined') {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $scope.checked = true;
|
|
|
+ }, function() {
|
|
|
+ toaster.pop('error', '注册情况加载失败');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (data == null || !data.content) {
|
|
|
+ //$scope.isAuthed = false;
|
|
|
+ AuthenticationService.redirectSignin();
|
|
|
}
|
|
|
- $scope.checked = true;
|
|
|
- }, function() {
|
|
|
- toaster.pop('error', '注册情况加载失败');
|
|
|
});
|
|
|
+
|
|
|
}]);
|
|
|
|
|
|
/**
|
|
|
* 机构认证第一步
|
|
|
*/
|
|
|
+ app.controller('CertificationStep1Ctrl', ['$scope', 'BaseService', '$http', '$rootScope', '$timeout', '$location', '$filter', 'toaster', 'Organization', 'AuthenticationService',
|
|
|
+ function ($scope, BaseService, $http, $rootScope, $timeout, $location, $filter, toaster, Organization, AuthenticationService) {
|
|
|
app.controller('CertificationStep1Ctrl', ['$scope', 'BaseService', '$http', '$rootScope', '$timeout', '$location', '$filter', 'toaster', 'Organization',
|
|
|
function ($scope, BaseService, $http, $rootScope, $timeout, $location, $filter, toaster, Organization) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
@@ -730,22 +762,31 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
$rootScope.thief = 'newOrg';
|
|
|
// 主要领域
|
|
|
// $scope.areas = ['疾病援助', '扶贫/救灾', '教育/助学' , '环境/动物保护', '其他'];
|
|
|
-
|
|
|
$scope.org = {
|
|
|
majorArea: 1
|
|
|
};
|
|
|
|
|
|
var orgCopy;
|
|
|
// 获取当前账户注册机构情况
|
|
|
- Organization.getByUuid({uuid : 222222}, {}, function(data) {//10041558
|
|
|
- if (typeof data.id == 'undefined') {
|
|
|
- return;
|
|
|
- }
|
|
|
+ AuthenticationService.getAuthentication().success(function (data) {
|
|
|
+ if (data.content) {
|
|
|
+ $scope.userUU = data.content.userUU;
|
|
|
|
|
|
- $scope.org = data;
|
|
|
- orgCopy = angular.copy($scope.org);
|
|
|
- }, function() {
|
|
|
- toaster.pop('error', '注册情况加载失败');
|
|
|
+ Organization.getByUuid({uuid : $scope.userUU}, {}, function(data) {//10041558
|
|
|
+ if (typeof data.id == 'undefined') {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ $scope.org = data;
|
|
|
+ orgCopy = angular.copy($scope.org);
|
|
|
+ }, function() {
|
|
|
+ toaster.pop('error', '注册情况加载失败');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (data == null || !data.content) {
|
|
|
+ //$scope.isAuthed = false;
|
|
|
+ AuthenticationService.redirectSignin();
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
// 获取地址信息
|
|
|
@@ -784,6 +825,7 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
$location.path('charityCertificationStep2');
|
|
|
}
|
|
|
} else {
|
|
|
+ org.uuid = $scope.userUU;
|
|
|
org.type = orgType;//机构类别(1:公募 2:非公募)
|
|
|
//var file = $scope.myFiles, file = file && file.length > 0 ? file[0] : null;// 可以不传附件
|
|
|
$http({
|
|
|
@@ -824,6 +866,9 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
/**
|
|
|
* 机构认证第二步
|
|
|
*/
|
|
|
+ app.controller('CertificationStep2Ctrl', ['$scope', 'BaseService', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization', 'AuthenticationService',
|
|
|
+ function ($scope, BaseService, $http, $rootScope, $timeout, $location, toaster, Organization, AuthenticationService) {
|
|
|
+
|
|
|
app.controller('CertificationStep2Ctrl', ['$scope', 'BaseService', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization',
|
|
|
function ($scope, BaseService, $http, $rootScope, $timeout, $location, toaster, Organization) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
@@ -831,11 +876,21 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
$rootScope.thief = 'newOrg';
|
|
|
var orgCopy;
|
|
|
// 获取当前账户注册机构情况
|
|
|
- Organization.getByUuid({uuid : 222222}, {}, function(data) {//10041558
|
|
|
- $scope.org = data;
|
|
|
- orgCopy = angular.copy($scope.org);
|
|
|
- }, function() {
|
|
|
- toaster.pop('error', '注册情况加载失败');
|
|
|
+ AuthenticationService.getAuthentication().success(function (data) {
|
|
|
+ if (data.content) {
|
|
|
+ $scope.userUU = data.content.userUU;
|
|
|
+
|
|
|
+ Organization.getByUuid({uuid : $scope.userUU}, {}, function(data) {//10041558
|
|
|
+ $scope.org = data;
|
|
|
+ orgCopy = angular.copy($scope.org);
|
|
|
+ }, function() {
|
|
|
+ toaster.pop('error', '注册情况加载失败');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (data == null || !data.content) {
|
|
|
+ //$scope.isAuthed = false;
|
|
|
+ AuthenticationService.redirectSignin();
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
//提交
|
|
|
@@ -886,6 +941,8 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
/**
|
|
|
* 机构认证第三步
|
|
|
*/
|
|
|
+ app.controller('CertificationStep3Ctrl', ['$scope', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization', 'BaseService', 'AuthenticationService',
|
|
|
+ function ($scope, $http, $rootScope, $timeout, $location, toaster, Organization, BaseService, AuthenticationService) {
|
|
|
app.controller('CertificationStep3Ctrl', ['$scope', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization', 'BaseService',
|
|
|
function ($scope, $http, $rootScope, $timeout, $location, toaster, Organization, BaseService) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
@@ -893,20 +950,31 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
$rootScope.thief = 'newOrg';
|
|
|
var orgCopy;
|
|
|
// 获取当前账户注册机构情况
|
|
|
- Organization.getByUuid({uuid : 222222}, {}, function(data) {//10041558
|
|
|
- if (typeof data.id == 'undefined') {
|
|
|
- return;
|
|
|
- }
|
|
|
- $scope.org = data;
|
|
|
- $scope.logoUrl = $scope.org.logo;
|
|
|
- $scope.personCertificateUrl = $scope.org.personCertificate;
|
|
|
- $scope.donateCertificateUrl = $scope.org.donateCertificate;
|
|
|
- $scope.legalIdCardUrl = $scope.org.legalIdCard;
|
|
|
+ AuthenticationService.getAuthentication().success(function (data) {
|
|
|
+ if (data.content) {
|
|
|
+ $scope.userUU = data.content.userUU;
|
|
|
|
|
|
- orgCopy = angular.copy($scope.org);
|
|
|
- }, function() {
|
|
|
- toaster.pop('error', '注册情况加载失败');
|
|
|
+ Organization.getByUuid({uuid : $scope.userUU}, {}, function(data) {//10041558
|
|
|
+ if (typeof data.id == 'undefined') {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $scope.org = data;
|
|
|
+ $scope.logoUrl = $scope.org.logo;
|
|
|
+ $scope.personCertificateUrl = $scope.org.personCertificate;
|
|
|
+ $scope.donateCertificateUrl = $scope.org.donateCertificate;
|
|
|
+ $scope.legalIdCardUrl = $scope.org.legalIdCard;
|
|
|
+
|
|
|
+ orgCopy = angular.copy($scope.org);
|
|
|
+ }, function() {
|
|
|
+ toaster.pop('error', '注册情况加载失败');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (data == null || !data.content) {
|
|
|
+ //$scope.isAuthed = false;
|
|
|
+ AuthenticationService.redirectSignin();
|
|
|
+ }
|
|
|
});
|
|
|
+
|
|
|
if (angular.isUndefined($scope.org)) {
|
|
|
$scope.org = {};
|
|
|
}
|
|
|
@@ -1130,6 +1198,9 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
/**
|
|
|
* 公募机构认证第四步
|
|
|
*/
|
|
|
+ app.controller('PublicCertificationStep4Ctrl', ['$scope', 'BaseService', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization', 'AuthenticationService',
|
|
|
+ function ($scope, BaseService, $http, $rootScope, $timeout, $location, toaster, Organization, AuthenticationService) {
|
|
|
+
|
|
|
app.controller('PublicCertificationStep4Ctrl', ['$scope', 'BaseService', '$http', '$rootScope', '$timeout', '$location', 'toaster', 'Organization',
|
|
|
function ($scope, BaseService, $http, $rootScope, $timeout, $location, toaster, Organization) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
@@ -1137,17 +1208,27 @@ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ngLocal', 'ngTable', 'file-
|
|
|
$rootScope.thief = 'newOrg';
|
|
|
var orgCopy;
|
|
|
// 获取当前账户注册机构情况
|
|
|
- Organization.getByUuid({uuid : 222222}, {}, function(data) {//10041166 10041558
|
|
|
- if (typeof data.id == 'undefined') {
|
|
|
- return;
|
|
|
- }
|
|
|
- $scope.org = data;
|
|
|
- $scope.materialUrl = $scope.org.material;
|
|
|
- $scope.certifyUrl = $scope.org.certify;
|
|
|
+ AuthenticationService.getAuthentication().success(function (data) {
|
|
|
+ if (data.content) {
|
|
|
+ $scope.userUU = data.content.userUU;
|
|
|
|
|
|
- orgCopy = angular.copy($scope.org);
|
|
|
- }, function() {
|
|
|
- toaster.pop('error', '注册情况加载失败');
|
|
|
+ Organization.getByUuid({uuid : $scope.userUU}, {}, function(data) {//10041166 10041558
|
|
|
+ if (typeof data.id == 'undefined') {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $scope.org = data;
|
|
|
+ $scope.materialUrl = $scope.org.material;
|
|
|
+ $scope.certifyUrl = $scope.org.certify;
|
|
|
+
|
|
|
+ orgCopy = angular.copy($scope.org);
|
|
|
+ }, function() {
|
|
|
+ toaster.pop('error', '注册情况加载失败');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (data == null || !data.content) {
|
|
|
+ //$scope.isAuthed = false;
|
|
|
+ AuthenticationService.redirectSignin();
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
if (angular.isUndefined($scope.org)) {
|