|
|
@@ -23,10 +23,6 @@ define(['app/app'], function (app) {
|
|
|
$scope.isAdmin = $rootScope.userInfo.enterprise.enAdminuu === $rootScope.userInfo.userUU ? true : false;
|
|
|
}
|
|
|
|
|
|
- // $scope.userInfo.pwdEnable = false;
|
|
|
- // $scope.userInfo.haveUserQuestion = false;
|
|
|
- // $scope.userInfo.userEmail = null;
|
|
|
-
|
|
|
//table设置
|
|
|
var applyToEnterpriseTableParams = function () {
|
|
|
$scope.applyToEnterpriseTableParams = new ngTableParams({
|
|
|
@@ -146,20 +142,20 @@ define(['app/app'], function (app) {
|
|
|
if (typeof $scope.userInfo != 'undefined' && typeof $scope.userInfo.enterprise != 'undefined') {
|
|
|
getEnterprise();
|
|
|
} else {
|
|
|
- AuthenticationService.getAuthentication().success(function (data) {
|
|
|
- $scope.userInfo = data;
|
|
|
- for (var i=0; i<$scope.userInfo.enterprises.length; i++) {
|
|
|
- if ($scope.userInfo.enterprises[i].current) {
|
|
|
- $scope.userInfo.enterprise = $scope.userInfo.enterprises[i];
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- if ($scope.userInfo.enterprise) {
|
|
|
- getEnterprise();
|
|
|
- }
|
|
|
- }, function (error) {
|
|
|
- toaster.pop('error', '获取用户信息失败');
|
|
|
- })
|
|
|
+ if ($scope.userInfo.enterprise) {
|
|
|
+ AuthenticationService.getAuthentication().success(function (data) {
|
|
|
+ $scope.userInfo = data;
|
|
|
+ for (var i=0; i<$scope.userInfo.enterprises.length; i++) {
|
|
|
+ if ($scope.userInfo.enterprises[i].current) {
|
|
|
+ $scope.userInfo.enterprise = $scope.userInfo.enterprises[i];
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ getEnterprise();
|
|
|
+ }, function (error) {
|
|
|
+ toaster.pop('error', '获取用户信息失败');
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|