Browse Source

账户管理 卖家中心

liusw 8 years ago
parent
commit
04f8772524

+ 1 - 1
src/main/resources/dev/account.properties

@@ -9,7 +9,7 @@ sso.secretkey=0taQcW073Z7G628g5H
 sso.cookie.secure=false
 sso.login.url=http://113.105.74.135:8001/sso/login
 sso.logout.url=http://113.105.74.135:8001/sso/logout
-sso.register.url=http://113.105.74.135:8001/sso/register
+sso.register.url=http://113.105.74.135:8001/sso/register_p
 
 #cross domain
 sso.ask.url=http://113.105.74.135:8001/sso/login/ask

+ 1 - 1
src/main/webapp/resources/js/vendor/app.js

@@ -55,7 +55,7 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
             controllerUrl: 'app/controllers/forstore/query_logistics_ctrl',
             controller: 'vendorQueryLogisticsCtrl'
         })).state('vendor_account_management', angularAMD.route({
-			url: '/account/management',
+			url: '/account/management/:op',
 			templateUrl: 'static/view/vendor/forstore/vendor_account_management.html',
 			title: '账户管理',
 			controllerUrl: 'app/controllers/forstore/vendor_account_management_ctrl',

+ 1155 - 390
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_account_management_ctrl.js

@@ -2,394 +2,1159 @@
  * Created by yujia on 2017/3/24.
  *  原厂认证
  */
-define(['app/app'], function(app) {
-    "use strict";
-    app.register.controller('vendorAccountManagementCtrl', ['$scope', '$rootScope', 'Enterprise', 'User', 'toaster', '$modal','BaseService','ngTableParams','$http', function($scope, $rootScope, Enterprise, User, toaster, $modal, BaseService, ngTableParams, $http) {
-        $rootScope.active = 'vendor_account_management';
-		$scope.tab = 'base';
-        $scope.userInfo = $rootScope.userInfo;
-		$scope.updateState = false;
-        // 获取企业信息
-        Enterprise.getEnterpriseInfo({enuu : $scope.userInfo.enterprise.uu}, function(data) {
-			$scope.enterpriseInfo = data;
-			$scope.enterpriseInfoBackup = angular.copy($scope.enterpriseInfo);
-			$scope.enAdminuu = $scope.enterpriseInfo.enAdminuu;
-			User.getUserByUU({uu: $scope.enAdminuu}, {}, function(data){
-		        	$scope.adminInfo = data;
-		        	console.log($scope.adminInfo);
-		        }, function(){
-		        	toaster.pop('error', '获取管理员信息失败');
-		        });
-		},function(response) {
-			toaster.pop('error', '获取企业信息失败');
-		});
-
-		$scope.tableParams = new ngTableParams({
-			page : 1, // show first page
-			count : 10 // count per page
-		}, {
-			total : 0,
-			getData : function($defer, params) {
-				var param = BaseService.parseParams(params.url());
-				param.enuu = $scope.userInfo.enterprise.uu;
-				if(!$scope.searchMthod) {
-					Enterprise.getAllUsersByEnuu(param, function (page) {
-						if (page) {
-							params.total(page.totalElements);
-							$defer.resolve(page.content);
-							$scope.users = page.content;
-						}
-					});
-				}
-				else {
-					param.keyword = $scope.keyword;
-					Enterprise.findUsersByKeyword(param,function (page) {
-						if (page) {
-							params.total(page.totalElements);
-							$defer.resolve(page.content);
-							$scope.users = page.content;
-						}
-					})
-				}
-			}
-		});
-
-		$scope.onSearch = function(keyword) {
-			if(keyword != null && keyword != '') {
-				$scope.searchMthod = true;
-				$scope.keyword = keyword;
-			} else {
-				$scope.searchMthod = false;
-			}
-			$scope.tableParams.page(1);
-			$scope.tableParams.reload();
-		};
-
-		$scope.newUser = {};
-
-		//弹出添加用户模态框
-		$scope.addExistUser = function () {
-			var modalInstance = $modal.open({
-				animation: true,
-				templateUrl: $rootScope.rootPath +'/static/view/vendor/forstore/addExistUser.html',
-					controller: 'AddExistUserCtrl'
-			});
-
-			modalInstance.result.then(function () {
-				$scope.userTelSuccess = false;
-				$scope.userTelError = false;
-				$scope.tableParams.page(1);
-				$scope.tableParams.reload();
-			}, function () {
-
-			});
-
-		};
-		/**
-		 * 添加未注册用户
-		 */
-		$scope.addUser = function () {
-			$scope.adding = true;
-			$scope.loading = true;
-			Enterprise.saveUser({}, $scope.newUser, function () {
-				$scope.loading = false;
-				toaster.pop('success', '提示', '增加用户成功:' + $scope.newUser.userName);
-				$scope.newUser = {userSex: 'M'};
-				$scope.tableParams.page(1);
-				$scope.tableParams.reload();
-				$scope.adding = false;
-				$scope.newUserForm.newUserTel.$setValidity('available', false);
-				$scope.newUserForm.newUserEmail.$setValidity('available', false);
-				$scope.userTelSuccess = false;
-				$scope.userTelError = false;
-				$scope.userEmailSuccess = false;
-				$scope.userEmailError = false;
-			}, function (response) {
-				$scope.loading = false;
-				toaster.pop('error', '错误', response.data);
-			});
-		};
-
-		/**
-		 * 删除用户
-		 */
-		$scope.removeUser = function (user) {
-
-			if (confirm('确定删除用户(' + user.userName + ')吗?')) {
-				Enterprise.removeUser({uu: user.userUU}, function () {
-					toaster.pop('success', '提示', '用户删除成功。');
-					$scope.tableParams.page(1);
-					$scope.tableParams.reload();
-				}, function (response) {
-					toaster.pop('error', '删除失败', response.data);
-				});
-			}
-		};
-		/**
-		 * 验证手机号是否可用
-		 */
-		$scope.telValid = function (tel) {
-			if (tel) {
-				$http.get('basic/user/telEnable', {
-					params: {
-						tel: tel
-					}
-				}).success(function (data) {
-					data = eval(data);
-					if (data == true) {
-						$scope.newUserForm.newUserTel.$setValidity('available', true);
-						$scope.userTelSuccess = true;
-						$scope.userTelError = false;
-					} else {
-						$scope.newUserForm.newUserTel.$setValidity('available', false);
-						$scope.userTelError = true;
-						$scope.userTelSuccess = false;
-						if (tel.length == 11)
-							toaster.pop('error', '错误', '手机号 ' + tel + ' 已被注册');
-					}
-				}).error(function () {
-					$scope.userTelSuccess = false;
-					$scope.userTelError = true;
-				});
-			} else {
-				$scope.userTelSuccess = false;
-				$scope.userTelError = false;
-			}
-		};
-
-		/**
-		 * 验证邮箱是否可用
-		 */
-		$scope.emailValid = function (email) {
-			if (email) {
-				$http.get('basic/user/emailEnable', {
-					params: {
-						email: email
-					}
-				}).success(function (data) {
-					data = eval(data);
-					if (data == true) {
-						$scope.newUserForm.newUserEmail.$setValidity('available', true);
-						$scope.userEmailSuccess = true;
-						$scope.userEmailError = false;
-					} else {
-						$scope.newUserForm.newUserEmail.$setValidity('available', false);
-						$scope.userEmailError = true;
-						$scope.userEmailSuccess = false;
-					}
-				}).error(function () {
-					$scope.userEmailError = true;
-					$scope.userEmailSuccess = false;
-				});
-			} else {
-				$scope.userEmailError = false;
-				$scope.userEmailSuccess = false;
-			}
-		};
-
-		/**
-		 * 变更到更新状态
-		 */
-		$scope.changeToUpdate = function(isUpdate) {
-			$scope.updateState = isUpdate;
-			if ($scope.updateState == false){
-				$scope.enterpriseInfo = angular.copy($scope.enterpriseInfoBackup);
-			}
-		};
-		/**
-		 * 验证企业信息
-		 */
-		function validateEnterpriseInfo() {
-			var props = ['enName', 'enShortname', 'enAddress', 'enUrl'];
-
-			var flag = true;
-			angular.forEach(props, function (prop) {
-				if ($scope.enterpriseInfo.hasOwnProperty(prop)) {
-					if (!$scope.enterpriseInfo[prop] || $scope.enterpriseInfo[prop] === '') {
-						console.log(prop + '不能为空');
-						// TODO 记录验证信息
-						flag = false;
-					}
-				} else {
-					console.log(prop + '不能为空');
-					flag = false;
-				}
-			});
-			return flag;
-		}
-		/**
-		 * 保存企业信息
-		 */
-		$scope.saveUpdate = function () {
-			// 先检查信息是否为空
-			if (angular.equals($scope.enterpriseInfo,$scope.enterpriseInfoBackup)){
-				toaster.pop('error', '未做任何修改');
-				$scope.updateState = false;
-				return ;
-			}
-			var enterpriseInfoFlag = validateEnterpriseInfo();
-			if (!enterpriseInfoFlag) {
-				toaster.pop('error', '请补充完信息后再次提交');
-				return ;
-			}
-			Enterprise.updateEnterpriseInfo({enuu : $scope.userInfo.enterprise.uu}, $scope.enterpriseInfo, function () {
-				$scope.loading = false;
-				toaster.pop('success', '提示', '企业信息修改成功');
-				$scope.enterpriseInfoBackup = angular.copy($scope.enterpriseInfo);
-				$scope.updateState = false;
-
-			}, function (response) {
-				$scope.loading = false;
-				toaster.pop('error', '修改失败', response.data);
-			});
-		};
-
-
-		// 切换tab
-		$scope.checkTab = function (t) {
-			$scope.tab = t;
-		};
-
-		$scope.updatePassword = function(){
-			var modalInstance = $modal.open({
-				animation: true,
-				templateUrl: $rootScope.rootPath + '/static/view/vendor/modal/updatePassword.html',
-				controller: 'PasswordCtrl',
-				resolve: {
-					user: function(){return angular.copy($rootScope.userInfo);}
-				}
-			});
-
-			modalInstance.result.then(function(){
-			}, function(){
-			});
-		};
-    }]);
-
-	/*
-	 * 绑定用户到企业
-	 */
-	app.register.controller('AddExistUserCtrl', ['$scope', '$modalInstance', 'Enterprise', 'AuthenticationService', '$timeout', 'toaster', function ($scope, $modalInstance, Enterprise, AuthenticationService, $timeout, toaster) {
-		$scope.searching = false;
-		//根据输入的内容查找用户
-		$scope.searchUser = function (keyWord) {
-			$scope.searching = true;
-			$scope.searchSuccess = false;
-			$scope.searchFailed = false;
-			$scope.illegalError = false;
-			$scope.reBindError = false;
-			$scope.okDisabled = false;
-			Enterprise.searchUser({keyWord: keyWord}, function (data) {
-				$scope.searchSuccess = true;
-				$scope.searchFailed = false;
-				$scope.user = data;		//查询到的用户
-			}, function (response) {
-				$scope.searchSuccess = false;
-				$scope.searchFailed = true;
-			});
-		};
-
-		//确认绑定
-		$scope.ok = function (keyWord) {
-			AuthenticationService.getAuthentication().success(function (data) {
-				$scope.currentUser = data;	//当前登录的用户(管理员)
-				//不可自己绑定自己
-				if ($scope.currentUser.userUU == $scope.user.userUU) {
-					$scope.illegalError = true;
-					$scope.okDisabled = true;
-					return false;
-				}
-
-				//用户未绑定到任何企业时
-				if (!$scope.user.enterprises) {
-					//正常绑定
-					Enterprise.bindUserToMyEnterprise({userUU: $scope.user.userUU}, function (data) {
-						$scope.okDisabled = true;
-						toaster.pop("success", "提示", "用户绑定成功");
-						$modalInstance.close(true);
-					}, function (response) {
-					});
-					return true;
-				}
-
-				//用户已绑定到某些企业时
-				for (var i = 0; i < $scope.currentUser.enterprises.length; i++) {
-					if ($scope.currentUser.enterprises[i].current) {
-						for (var j = 0; j < $scope.user.enterprises.length; j++) {
-							//该用户已绑定到当前企业,不可重复绑定
-							if ($scope.currentUser.enterprises[i].uu == $scope.user.enterprises[j].uu) {
-								$scope.reBindError = true;
-								$scope.okDisabled = true;
-								return false;
-							}
-						}
-						//该用户未绑定到当前企业,可以进行绑定
-						Enterprise.bindUserToMyEnterprise({userUU: $scope.user.userUU}, function (data) {
-							$scope.okDisabled = true;
-							toaster.pop("success", "提示", "用户绑定成功");
-							$modalInstance.close(true);
-						}, function (response) {
-							console.log("绑定失败!");
-						});
-
-					}
-				}
-
-			});
-		};
-
-		$scope.cancel = function () {
-			$modalInstance.dismiss();
-		};
-	}]);
-
-	// 修改密码Controller
-	app.register.controller('PasswordCtrl', ['$scope', '$modalInstance', 'user', 'User', 'toaster', function($scope, $modalInstance, user, User, toaster){
-		$scope.user = user;
-		$scope.checking = false;
-		//输入原密码后验证原密码是否正确
-		$scope.checkPassword = function(password) {
-			$scope.checking = true;
-			$scope.checkSuccess = false;
-			$scope.checkFailed = false;
-			User.checkPassword({password: password}, function(){
-				$scope.checkSuccess = true;
-				$scope.checking = false;
-				$scope.checkFailed = false;
-			}, function(){
-				$scope.checkFailed = true;
-				$scope.checking = false;
-				$scope.checkSuccess = false;
-			});
-		};
-
-		//修改密码
-		$scope.ok = function () {
-			if($scope.user.newPassword == $scope.user.password){
-				toaster.pop('error', '错误', '新密码与原密码相同');
-				return;
-			}
-			if($scope.user.newPassword == $scope.user.newPassword1) {//验证重复密码相等
-				User.updatePassword({password: $scope.user.password, newPassword: $scope.user.newPassword}, {}, function(){
-					toaster.pop('success', '成功', '修改密码成功,请牢记您的新密码。');
-					$scope.user.password = null;
-					$scope.user.newPassword = null;
-					$scope.user.newPassword1 = null;
-					$scope.checking = false;
-					$scope.checkSuccess = false;
-					$scope.checkFailed = false;
-					$modalInstance.close();
-				}, function(response){
-					toaster.pop('error', '错误', response.data);
-					$modalInstance.close();
-				});
-			} else {
-				toaster.pop('error', '错误', '重复密码不一致');
-			}
-		};
-
-		$scope.cancel = function () {
-			$modalInstance.close();
-		};
-	}]);
+define(['app/app'], function (app) {
+  "use strict";
+  app.register.controller('vendorAccountManagementCtrl',
+      ['$scope', '$rootScope', 'Enterprise', 'User', 'toaster', '$modal',
+        'BaseService', 'ngTableParams', '$http','$stateParams',
+        function ($scope, $rootScope, Enterprise, User, toaster, $modal,
+            BaseService, ngTableParams, $http,$stateParams) {
+          $rootScope.active = 'vendor_account_management';
+          $scope.tab = 'base';
+          $scope.userInfo = $rootScope.userInfo;
+          $scope.updateState = false;
+          //手机号和邮箱号的部分隐藏
+          $scope.userInfo.userTel = $scope.userInfo.userTel.substr(0, 3) + '****' + $scope.userInfo.userTel.substr(7);
+          var userEmailTemp = $scope.userInfo.userEmail.indexOf("@");
+          $scope.userInfo.userEmail = $scope.userInfo.userEmail.substr(0,userEmailTemp-2)+"***"+$scope.userInfo.userEmail.substr(userEmailTemp);
+          // 获取企业信息
+          Enterprise.getEnterpriseInfo({enuu: $scope.userInfo.enterprise.uu},
+              function (data) {
+                $scope.enterpriseInfo = data;
+                $scope.enterpriseInfoBackup = angular.copy(
+                    $scope.enterpriseInfo);
+                $scope.enAdminuu = $scope.enterpriseInfo.enAdminuu;
+                User.getUserByUU({uu: $scope.enAdminuu}, {}, function (data) {
+                  $scope.adminInfo = data;
+                  console.log($scope.adminInfo);
+                }, function () {
+                  toaster.pop('error', '获取管理员信息失败');
+                });
+              }, function (response) {
+                toaster.pop('error', '获取企业信息失败');
+              });
+
+          $scope.tableParams = new ngTableParams({
+            page: 1, // show first page
+            count: 10 // count per page
+          }, {
+            total: 0,
+            getData: function ($defer, params) {
+              var param = BaseService.parseParams(params.url());
+              param.enuu = $scope.userInfo.enterprise.uu;
+              if (!$scope.searchMthod) {
+                Enterprise.getAllUsersByEnuu(param, function (page) {
+                  if (page) {
+                    params.total(page.totalElements);
+                    $defer.resolve(page.content);
+                    $scope.users = page.content;
+                  }
+                });
+              }
+              else {
+                param.keyword = $scope.keyword;
+                Enterprise.findUsersByKeyword(param, function (page) {
+                  if (page) {
+                    params.total(page.totalElements);
+                    $defer.resolve(page.content);
+                    $scope.users = page.content;
+                  }
+                })
+              }
+            }
+          });
+
+          $scope.onSearch = function (keyword) {
+            if (keyword != null && keyword != '') {
+              $scope.searchMthod = true;
+              $scope.keyword = keyword;
+            } else {
+              $scope.searchMthod = false;
+            }
+            $scope.tableParams.page(1);
+            $scope.tableParams.reload();
+          };
+
+          $scope.newUser = {};
+
+          //弹出添加用户模态框
+          $scope.addExistUser = function () {
+            var modalInstance = $modal.open({
+              animation: true,
+              templateUrl: $rootScope.rootPath
+              + '/static/view/vendor/forstore/addExistUser.html',
+              controller: 'AddExistUserCtrl'
+            });
+
+            modalInstance.result.then(function () {
+              $scope.userTelSuccess = false;
+              $scope.userTelError = false;
+              $scope.tableParams.page(1);
+              $scope.tableParams.reload();
+            }, function () {
+
+            });
+
+          };
+          /**
+           * 添加未注册用户
+           */
+          $scope.addUser = function () {
+            $scope.adding = true;
+            $scope.loading = true;
+            Enterprise.saveUser({}, $scope.newUser, function () {
+              $scope.loading = false;
+              toaster.pop('success', '提示', '增加用户成功:' + $scope.newUser.userName);
+              $scope.newUser = {userSex: 'M'};
+              $scope.tableParams.page(1);
+              $scope.tableParams.reload();
+              $scope.adding = false;
+              $scope.newUserForm.newUserTel.$setValidity('available', false);
+              $scope.newUserForm.newUserEmail.$setValidity('available', false);
+              $scope.userTelSuccess = false;
+              $scope.userTelError = false;
+              $scope.userEmailSuccess = false;
+              $scope.userEmailError = false;
+            }, function (response) {
+              $scope.loading = false;
+              toaster.pop('error', '错误', response.data);
+            });
+          };
+
+          /**
+           * 删除用户
+           */
+          $scope.removeUser = function (user) {
+
+            if (confirm('确定删除用户(' + user.userName + ')吗?')) {
+              Enterprise.removeUser({uu: user.userUU}, function () {
+                toaster.pop('success', '提示', '用户删除成功。');
+                $scope.tableParams.page(1);
+                $scope.tableParams.reload();
+              }, function (response) {
+                toaster.pop('error', '删除失败', response.data);
+              });
+            }
+          };
+          /**
+           * 验证手机号是否可用
+           */
+          $scope.telValid = function (tel) {
+            if (tel) {
+              $http.get('basic/user/telEnable', {
+                params: {
+                  tel: tel
+                }
+              }).success(function (data) {
+                data = eval(data);
+                if (data == true) {
+                  $scope.newUserForm.newUserTel.$setValidity('available', true);
+                  $scope.userTelSuccess = true;
+                  $scope.userTelError = false;
+                } else {
+                  $scope.newUserForm.newUserTel.$setValidity('available',
+                      false);
+                  $scope.userTelError = true;
+                  $scope.userTelSuccess = false;
+                  if (tel.length == 11) {
+                    toaster.pop('error', '错误', '手机号 ' + tel + ' 已被注册');
+                  }
+                }
+              }).error(function () {
+                $scope.userTelSuccess = false;
+                $scope.userTelError = true;
+              });
+            } else {
+              $scope.userTelSuccess = false;
+              $scope.userTelError = false;
+            }
+          };
+
+          /**
+           * 验证邮箱是否可用
+           */
+          $scope.emailValid = function (email) {
+            if (email) {
+              $http.get('basic/user/emailEnable', {
+                params: {
+                  email: email
+                }
+              }).success(function (data) {
+                data = eval(data);
+                if (data == true) {
+                  $scope.newUserForm.newUserEmail.$setValidity('available',
+                      true);
+                  $scope.userEmailSuccess = true;
+                  $scope.userEmailError = false;
+                } else {
+                  $scope.newUserForm.newUserEmail.$setValidity('available',
+                      false);
+                  $scope.userEmailError = true;
+                  $scope.userEmailSuccess = false;
+                }
+              }).error(function () {
+                $scope.userEmailError = true;
+                $scope.userEmailSuccess = false;
+              });
+            } else {
+              $scope.userEmailError = false;
+              $scope.userEmailSuccess = false;
+            }
+          };
+
+          /**
+           * 变更到更新状态
+           */
+          $scope.changeToUpdate = function (isUpdate) {
+            $scope.updateState = isUpdate;
+            if ($scope.updateState == false) {
+              $scope.enterpriseInfo = angular.copy($scope.enterpriseInfoBackup);
+            }
+          };
+
+          /**
+           * 验证企业信息
+           */
+          function validateEnterpriseInfo() {
+            var props = ['enName', 'enShortname', 'enAddress', 'enUrl'];
+
+            var flag = true;
+            angular.forEach(props, function (prop) {
+              if ($scope.enterpriseInfo.hasOwnProperty(prop)) {
+                if (!$scope.enterpriseInfo[prop] || $scope.enterpriseInfo[prop]
+                    === '') {
+                  console.log(prop + '不能为空');
+                  // TODO 记录验证信息
+                  flag = false;
+                }
+              } else {
+                console.log(prop + '不能为空');
+                flag = false;
+              }
+            });
+            return flag;
+          }
+
+          /**
+           * 保存企业信息
+           */
+          $scope.saveUpdate = function () {
+            // 先检查信息是否为空
+            if (angular.equals($scope.enterpriseInfo,
+                    $scope.enterpriseInfoBackup)) {
+              toaster.pop('error', '未做任何修改');
+              $scope.updateState = false;
+              return;
+            }
+            var enterpriseInfoFlag = validateEnterpriseInfo();
+            if (!enterpriseInfoFlag) {
+              toaster.pop('error', '请补充完信息后再次提交');
+              return;
+            }
+            Enterprise.updateEnterpriseInfo(
+                {enuu: $scope.userInfo.enterprise.uu}, $scope.enterpriseInfo,
+                function () {
+                  $scope.loading = false;
+                  toaster.pop('success', '提示', '企业信息修改成功');
+                  $scope.enterpriseInfoBackup = angular.copy(
+                      $scope.enterpriseInfo);
+                  $scope.updateState = false;
+
+                }, function (response) {
+                  $scope.loading = false;
+                  toaster.pop('error', '修改失败', response.data);
+                });
+          };
+
+          // 切换tab
+          $scope.checkTab = function (t) {
+            $scope.tab = t;
+          };
+
+          $scope.updatePassword = function () {
+            var modalInstance = $modal.open({
+              animation: true,
+              templateUrl: $rootScope.rootPath
+              + '/static/view/vendor/modal/updatePassword.html',
+              controller: 'PasswordCtrl',
+              resolve: {
+                user: function () {
+                  return angular.copy($rootScope.userInfo);
+                }
+              }
+            });
+
+            modalInstance.result.then(function () {
+            }, function () {
+            });
+          };
+
+          $scope.updateUserEmail = function(){
+            var modalInstance = $modal.open({
+              animation: true,
+              templateUrl: $rootScope.rootPath + '/static/view/vendor/modal/updateUserEmail.html',
+              controller: 'UserEmailCtrl',
+              resolve: {
+                user: function(){return angular.copy($rootScope.userInfo);}
+              }
+            });
+
+            modalInstance.result.then(function(){
+            }, function(){
+            });
+          };
+
+          $scope.updateUserTel = function(){
+            var modalInstance = $modal.open({
+              animation: true,
+              templateUrl: $rootScope.rootPath + '/static/view/vendor/modal/updateUserTel.html',
+              controller: 'UserTelCtrl',
+              resolve: {
+                user: function(){return angular.copy($rootScope.userInfo);}
+              }
+            });
+
+            modalInstance.result.then(function(){
+            }, function(){
+            });
+          };
+
+          $scope.updateUserPay = function(){
+            var modalInstance = $modal.open({
+              animation: true,
+              templateUrl: $rootScope.rootPath + '/static/view/vendor/modal/updateUserPay.html',
+              controller: 'UserPayCtrl',
+              resolve: {
+                user: function(){return angular.copy($rootScope.userInfo);}
+              }
+            });
+
+            modalInstance.result.then(function(){
+            }, function(){
+            });
+          };
+
+          $scope.updateUserQuestion = function(){
+            var modalInstance = $modal.open({
+              animation: true,
+              templateUrl: $rootScope.rootPath + '/static/view/vendor/modal/updateUserQuestion.html',
+              controller: 'UserQuestionCtrl',
+              resolve: {
+                user: function(){return angular.copy($rootScope.userInfo);}
+              }
+            });
+
+            modalInstance.result.then(function(){
+            }, function(){
+            });
+          };
+
+          $scope.updateRealAuth = function(){
+            var modalInstance = $modal.open({
+              animation: true,
+              templateUrl: $rootScope.rootPath + '/static/view/vendor/modal/updateRealAuth.html',
+              controller: 'UserRealAuthCtrl',
+              resolve: {
+                user: function(){return angular.copy($rootScope.userInfo);}
+              }
+            });
+
+            modalInstance.result.then(function(){
+            }, function(){
+            });
+          };
+
+          //卖家中心 等级提示跳转
+          if($stateParams.op!=""){
+            var op =$stateParams.op;
+            $scope.checkTab('safe');
+            switch(op)
+            {
+              case 'pwd':
+                $scope.updatePassword();
+                break;
+              case 'question':
+                $scope.updateUserQuestion();
+                break;
+              case 'email':
+                $scope.updateUserEmail();
+                break;
+            }
+          }
+        }]);
+
+  /*
+   * 绑定用户到企业
+   */
+  app.register.controller('AddExistUserCtrl',
+      ['$scope', '$modalInstance', 'Enterprise', 'AuthenticationService',
+        '$timeout', 'toaster',
+        function ($scope, $modalInstance, Enterprise, AuthenticationService,
+            $timeout, toaster) {
+          $scope.searching = false;
+          //根据输入的内容查找用户
+          $scope.searchUser = function (keyWord) {
+            $scope.searching = true;
+            $scope.searchSuccess = false;
+            $scope.searchFailed = false;
+            $scope.illegalError = false;
+            $scope.reBindError = false;
+            $scope.okDisabled = false;
+            Enterprise.searchUser({keyWord: keyWord}, function (data) {
+              $scope.searchSuccess = true;
+              $scope.searchFailed = false;
+              $scope.user = data;		//查询到的用户
+            }, function (response) {
+              $scope.searchSuccess = false;
+              $scope.searchFailed = true;
+            });
+          };
+
+          //确认绑定
+          $scope.ok = function (keyWord) {
+            AuthenticationService.getAuthentication().success(function (data) {
+              $scope.currentUser = data;	//当前登录的用户(管理员)
+              //不可自己绑定自己
+              if ($scope.currentUser.userUU == $scope.user.userUU) {
+                $scope.illegalError = true;
+                $scope.okDisabled = true;
+                return false;
+              }
+
+              //用户未绑定到任何企业时
+              if (!$scope.user.enterprises) {
+                //正常绑定
+                Enterprise.bindUserToMyEnterprise({userUU: $scope.user.userUU},
+                    function (data) {
+                      $scope.okDisabled = true;
+                      toaster.pop("success", "提示", "用户绑定成功");
+                      $modalInstance.close(true);
+                    }, function (response) {
+                    });
+                return true;
+              }
+
+              //用户已绑定到某些企业时
+              for (var i = 0; i < $scope.currentUser.enterprises.length; i++) {
+                if ($scope.currentUser.enterprises[i].current) {
+                  for (var j = 0; j < $scope.user.enterprises.length; j++) {
+                    //该用户已绑定到当前企业,不可重复绑定
+                    if ($scope.currentUser.enterprises[i].uu
+                        == $scope.user.enterprises[j].uu) {
+                      $scope.reBindError = true;
+                      $scope.okDisabled = true;
+                      return false;
+                    }
+                  }
+                  //该用户未绑定到当前企业,可以进行绑定
+                  Enterprise.bindUserToMyEnterprise(
+                      {userUU: $scope.user.userUU}, function (data) {
+                        $scope.okDisabled = true;
+                        toaster.pop("success", "提示", "用户绑定成功");
+                        $modalInstance.close(true);
+                      }, function (response) {
+                        console.log("绑定失败!");
+                      });
+
+                }
+              }
+
+            });
+          };
+
+          $scope.cancel = function () {
+            $modalInstance.dismiss();
+          };
+        }]);
+
+  app.register.controller('PasswordCtrl',
+      ['$scope', '$modalInstance', 'user', 'User', 'toaster',
+        function ($scope, $modalInstance, user, User, toaster) {
+          $scope.user = user;
+          $scope.checking = false;
+          //输入原密码后验证原密码是否正确
+          $scope.checkPassword = function (password) {
+            $scope.checking = true;
+            $scope.checkSuccess = false;
+            $scope.checkFailed = false;
+            User.checkPassword({password: password}, function () {
+              $scope.checkSuccess = true;
+              $scope.checking = false;
+              $scope.checkFailed = false;
+            }, function () {
+              $scope.checkFailed = true;
+              $scope.checking = false;
+              $scope.checkSuccess = false;
+            });
+          };
+
+          //对新密码进行校验
+          $scope.checkSuccess1 = false;
+          $scope.checkFailed1 = false;
+          $scope.checkNewPassword = function (newPassword) {
+            var reg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,20}$/;
+            if (newPassword == null || !reg.test(newPassword)) {
+              //toaster.pop('error', '错误', '密码为8-20字符的英文、数字混合');
+              $scope.checkSuccess1 = false;
+              $scope.checkFailed1 = true;
+              return;
+            } else {
+              $scope.checkSuccess1 = true;
+              $scope.checkFailed1 = false;
+            }
+          }
+
+          //密码强度校验
+          $scope.secLevel = 0;
+          $scope.checkPasswordLevel = function (newPassword) {
+            $scope.checkFailed1 = false;
+            if (newPassword == null) {
+              $scope.secLevel = 0;
+              return;
+            }
+            //不足8位,或仅有数字,或仅有英文
+            if (newPassword.length < 8 || /^[0-9]*$/.test(newPassword)
+                || /^[A-Za-z]*$/.test(newPassword)) {
+              $scope.secLevel = 1;
+              return;
+            }
+            if (/^[A-Z0-9]{8,20}$/.test(newPassword) || /^[a-z0-9]{8,20}$/.test(
+                    newPassword)) {//达到8位,且 仅有数字+英文小写 或 仅有数字+英文大写
+              $scope.secLevel = 2;
+              return;
+            }
+            if (/^(?=.*[0-9].*)(?=.*[A-Z].*)(?=.*[a-z].*).{8,20}$/.test(
+                    newPassword)) {
+              $scope.secLevel = 3;
+              return;
+            }
+          }
+
+          //校验确认密码是否与新密码相同
+          $scope.checkSuccess2 = false;
+          $scope.checkFailed2 = false;
+          $scope.checkNewPassword1 = function () {
+            if ($scope.checkSuccess1 == true && ($scope.user.newPassword
+                    == $scope.user.newPassword1)) {
+              $scope.checkSuccess2 = true;
+              $scope.checkFailed2 = false;
+              return;
+            }
+            $scope.checkSuccess2 = false;
+            $scope.checkFailed2 = true;
+          }
+
+          //修改密码
+          $scope.ok = function () {
+            if ($scope.user.newPassword == $scope.user.password) {
+              toaster.pop('error', '错误', '新密码与原密码相同');
+              return;
+            }
+            if ($scope.secLevel <= 1) {
+              toaster.pop('error', '错误', '密码强度不够,请重新输入');
+              return;
+            }
+            if ($scope.user.newPassword == $scope.user.newPassword1) {//验证重复密码相等
+              User.updatePassword({
+                password: $scope.user.password,
+                newPassword: $scope.user.newPassword,
+                secLevel: $scope.secLevel
+              }, {}, function () {
+                toaster.pop('success', '成功', '修改密码成功,请牢记您的新密码。');
+                $scope.user.password = null;
+                $scope.user.newPassword = null;
+                $scope.user.newPassword1 = null;
+                $scope.checking = false;
+                $scope.checkSuccess = false;
+                $scope.checkFailed = false;
+                $scope.checkSuccess1 = false;
+                $scope.checkFailed1 = false;
+                $scope.checkSuccess2 = false;
+                $scope.checkFailed2 = false;
+                $modalInstance.close();
+              }, function (response) {
+                toaster.pop('error', '错误', response.data);
+                $modalInstance.close();
+              });
+            } else {
+              toaster.pop('error', '错误', '重复密码不一致');
+            }
+          };
+
+          $scope.cancel = function () {
+            $modalInstance.close();
+          };
+        }]);
+  // 修改邮箱Controller
+  app.register.controller('UserEmailCtrl',
+      ['$scope', '$modalInstance', 'user', 'User', 'toaster', '$interval',
+        function ($scope, $modalInstance, user, User, toaster, $interval) {
+          $scope.user = user;
+          $scope.user.userEmail = null;
+          $scope.user.newUserEmail = null;
+          //验证用户输入的旧邮箱地址是否正确
+          $scope.checkUserEmail = function (userEmail) {
+            if (userEmail == null) {
+              $scope.checkFailed = true;
+              $scope.checkSuccess = false;
+              return;
+            }
+            $scope.checkSuccess = false;
+            $scope.checkFailed = false;
+            User.checkUserEmail({userEmail: userEmail}, function () {
+              $scope.checkSuccess = true;
+              $scope.checkFailed = false;
+            }, function () {
+              $scope.checkFailed = true;
+              $scope.checkSuccess = false;
+            });
+          };
+
+          //验证用户新输入的邮箱是否可用
+          $scope.checkSuccess1 = false;
+          $scope.checkFailed1 = false;
+          $scope.emailEnable = function (newUserEmail) {
+            if ((newUserEmail == null || newUserEmail.length > 30)
+                && !/^(\w)+(\.\w+)*@(\w)+((\.\w{2,3}){1,3})$/.test(
+                    newUserEmail)) {
+              $scope.checkSuccess1 = false;
+              $scope.checkFailed1 = true;
+              $scope.sendSuccess = false;
+            }
+            User.emailEnable({email: newUserEmail}, function (data) {
+              if (data.data == "true") {//邮箱可用
+                $scope.checkSuccess1 = true;
+                $scope.checkFailed1 = false;
+                $scope.sendSuccess = true;
+              } else {//邮箱不可用
+                $scope.checkSuccess1 = false;
+                $scope.checkFailed1 = true;
+                $scope.sendSuccess = false;
+              }
+            }, function () {
+              $scope.checkSuccess1 = false;
+              $scope.checkFailed1 = true;
+              $scope.sendSuccess = false;
+            });
+          };
+
+          $scope.codeSuccess = false;
+          //发送验证码
+          $scope.sendCheckCode = function (newUserEmail) {
+            User.sendCheckCode({newUserEmail: newUserEmail}, function () {
+              $scope.codeSuccess = true;
+              $interval.cancel(timePromise);
+              var second = 60,
+                  timePromise = $interval(function () {
+                    $scope.sendSuccess = false;
+                    if (second <= 0) {
+                      $interval.cancel(timePromise);
+                      second = 60;
+                    } else {
+                      second--;
+                      $scope.paracont = second + "秒后可重发";
+                      if (second == 0) {
+                        $scope.paracont = "重发验证码";
+                        $scope.sendSuccess = true;
+                      }
+                    }
+                  }, 1000, 60);
+            }, function () {
+              $scope.codeSuccess = false;
+            });
+          };
+
+          $scope.validSuccess = false;
+          //校验验证码
+          $scope.validCheckCode = function (checkCode) {
+            User.validCheckCode({checkCode: checkCode}, function (data) {
+              var status = data.status;
+              var message = data.message;
+              if (status == 1) {
+                $scope.validSuccess = true;
+              } else {
+                toaster.pop('error', '错误', message);
+              }
+            });
+          };
+
+          //修改邮箱地址
+          $scope.ok = function () {
+            if ($scope.user.newUserEmail == $scope.user.userEmail) {
+              toaster.pop('error', '错误', '新邮箱地址与旧邮箱地址相同');
+              return;
+            }
+            User.updateUserEmail({
+              userEmail: $scope.user.userEmail,
+              newUserEmail: $scope.user.newUserEmail
+            }, {}, function () {
+              toaster.pop('success', '成功', '修改邮箱成功。');
+              $scope.user.userEmail = null;
+              $scope.user.newUserEmail = null;
+              $scope.checking = false;
+              $scope.checkSuccess = false;
+              $scope.checkFailed = false;
+              $scope.codeSuccess = false;
+              $scope.validSuccess = false;
+              $scope.checkSuccess1 = false;
+              $scope.checkFailed1 = false;
+              $scope.sendSuccess = false;
+              $modalInstance.close();
+            }, function (response) {
+              toaster.pop('error', '错误', response.data);
+              $modalInstance.close();
+            });
+          };
+
+          $scope.cancel = function () {
+            $modalInstance.close();
+          };
+        }]);
+
+  //手机验证Controller
+  app.register.controller('UserTelCtrl',
+      ['$scope', '$modalInstance', 'user', 'User', 'toaster', '$interval',
+        function ($scope, $modalInstance, user, User, toaster, $interval) {
+          User.getPageToken();
+          $scope.user = user;
+          $scope.user.userTel = null;
+          //原手机号校验
+          $scope.checking = false;
+          //验证用户输入的旧邮箱地址是否正确
+          $scope.checkUserTel = function (userTel) {
+            $scope.checking = true;
+            $scope.checkSuccess = false;
+            $scope.checkFailed = false;
+            User.checkUserTel({userTel: userTel}, function () {
+              $scope.checkSuccess = true;
+              $scope.checking = false;
+              $scope.checkFailed = false;
+            }, function () {
+              $scope.checkFailed = true;
+              $scope.checking = false;
+              $scope.checkSuccess = false;
+            });
+          };
+
+          //新手机号是否可用
+          $scope.sendSuccess = false;
+          $scope.checkFailed1 = false;
+          $scope.checkSuccess1 = false;
+          $scope.telEnable = function (newUserTel) {
+            if (newUserTel == null || !/^[0-9]{8,11}$/.test(newUserTel)) {
+              $scope.checkFailed1 = true;
+              $scope.checkSuccess1 = false;
+              $scope.sendSuccess = false;
+              return;
+            }
+            $scope.checking1 = true;
+            $scope.checkSuccess1 = false;
+            $scope.checkFailed1 = false;
+            User.telEnable({tel: newUserTel}, function (data) {
+              if (data.data == "true") {//手机可用
+                $scope.checkSuccess1 = true;
+                $scope.checkFailed1 = false;
+                $scope.sendSuccess = true;
+              } else {//手机不可用
+                $scope.checkFailed1 = true;
+                $scope.checking1 = false;
+                $scope.checkSuccess1 = false;
+                $scope.sendSuccess = false;
+              }
+            }, function () {
+              $scope.checkFailed1 = true;
+              $scope.checking1 = false;
+              $scope.checkSuccess1 = false;
+            });
+          };
+
+          //发送验证码
+          $scope.codeSuccess = false;
+          //发送验证码
+          $scope.sendTelCheckCode = function (newUserTel) {
+            User.sendTelCheckCode({newUserTel: newUserTel}, function () {
+              $scope.codeSuccess = true;
+              $interval.cancel(timePromise);
+              var second = 60,
+                  timePromise = $interval(function () {
+                    $scope.sendSuccess = false;
+                    if (second <= 0) {
+                      $interval.cancel(timePromise);
+                      second = 60;
+                    } else {
+                      second--;
+                      $scope.paracont = second + "秒后可重发";
+                      if (second == 0) {
+                        $scope.paracont = "重发验证码";
+                        $scope.sendSuccess = true;
+                      }
+                    }
+                  }, 1000, 60);
+            }, function () {
+              $scope.codeSuccess = false;
+            });
+          };
+
+          $scope.validSuccess = false;
+          $scope.validFailed = false;
+          //校验验证码
+          $scope.validTelCheckCode = function (telCheckCode) {
+            User.validTelCheckCode({telCheckCode: telCheckCode},
+                function (data) {
+                  var status = data.status;
+                  var message = data.message;
+                  if (status == 1) {
+                    $scope.validSuccess = true;
+                    $scope.validFailed = false;
+                  } else {
+                    $scope.validSuccess = false;
+                    $scope.validFailed = true;
+                  }
+                });
+          };
+
+          //修改手机
+          $scope.ok = function () {
+            if ($scope.user.newUserTel == $scope.user.userTel) {
+              toaster.pop('error', '错误', '新手机号与旧手机号相同');
+              return;
+            }
+            User.updateUserTel({
+              newUserTel: $scope.user.newUserTel,
+              userTel: $scope.user.userTel
+            }, {}, function () {
+              toaster.pop('success', '成功', '手机修改成功。');
+              $scope.user.userTel = null;
+              $scope.user.newUserTel = null;
+              $scope.checking = false;
+              $scope.checkSuccess = false;
+              $scope.checkFailed = false;
+              $scope.checking1 = false;
+              $scope.checkSuccess1 = false;
+              $scope.checkFailed1 = false;
+              $scope.emailSuccess = false;
+              $scope.codeSuccess = false;
+              $scope.validSuccess = false;
+              $modalInstance.close();
+            }, function (response) {
+              toaster.pop('error', '错误', response.data);
+              $modalInstance.close();
+            });
+          };
+
+          $scope.cancel = function () {
+            $modalInstance.close();
+          };
+        }]);
+
+  // 设置支付密码Controller
+  app.register.controller('UserPayCtrl',
+      ['$scope', '$modalInstance', 'user', 'User', 'toaster',
+        function ($scope, $modalInstance, user, User, toaster) {
+          //原密码框是否显示
+          $scope.checking = true;
+          //验证是否设置密码
+          $scope.checkHaveUserPay = function () {
+            $scope.userPayHidden = false;
+            $scope.isNewSuccess = false;
+            $scope.isNewFailed = true;
+            User.checkHaveUserPay(function (data) {
+              var flag = data.data;
+              if (flag == "false") {
+                //隐藏原密码输入框
+                angular.element(".oldUserPay").remove();
+                //修改新密码框内容
+                $scope.newUserPayLabel = "密码";
+                $scope.isNewSuccess = true;
+                $scope.isNewFailed = false;
+                $scope.checking = false;
+              }
+            });
+          }
+
+          //校验原密码是否正确
+          $scope.checkUserPay = function (userPay) {
+            if (userPay != null) {
+              $scope.checkSuccess = false;
+              $scope.checkFailed = false;
+              User.checkUserPay({userPay: userPay}, function () {
+                $scope.checkFailed = false;
+                $scope.checkSuccess = true;
+              }, function () {
+                $scope.checkFailed = true;
+                $scope.checkSuccess = false;
+              });
+            }
+          }
+
+          //输入新密码,进行校验
+          $scope.checkSuccess1 = false;
+          $scope.checkFailed1 = false;
+          $scope.checkNewUserPay = function (newUserPay) {
+            if (newUserPay != null) {
+              //如果两者相同 则返回
+              if ($scope.checking && ($scope.user.userPay
+                      == $scope.user.newUserPay)) {
+                toaster.pop('error', '错误', '新密码与原密码相同');
+                $scope.checkFailed1 = true;
+                $scope.checkSuccess1 = false;
+                return;
+              }
+              //正则校验
+              var reg = /^\d{6}$/;
+              if (!reg.test(newUserPay)) {
+                $scope.checkFailed1 = true;
+                $scope.checkSuccess1 = false;
+                return;
+              }
+              $scope.checkFailed1 = false;
+              $scope.checkSuccess1 = true;
+            }
+          }
+
+          //校验确认密码是否与新密码相同
+          $scope.checkSuccess2 = false;
+          $scope.checkFailed2 = false;
+          $scope.checkNewUserPay1 = function () {
+            if ($scope.checkSuccess1 == true && ($scope.user.newUserPay
+                    == $scope.user.newUserPay1)) {
+              $scope.checkSuccess2 = true;
+              $scope.checkFailed2 = false;
+              return;
+            }
+            $scope.checkSuccess2 = false;
+            $scope.checkFailed2 = true;
+          }
+
+          //支付密码
+          $scope.ok = function () {
+            if ($scope.checking && ($scope.user.newUserPay
+                    == $scope.user.userPay)) {
+              toaster.pop('error', '错误', '新密码与旧密码相同');
+              return;
+            }
+            User.updateUserPay({
+              newUserPay: $scope.user.newUserPay,
+              userPay: $scope.user.userPay
+            }, {}, function () {
+              toaster.pop('success', '成功', '支付密码设置成功。');
+              $scope.user.userPay = null;
+              $scope.user.newUserPay = null;
+              $scope.checkSuccess = false;
+              $scope.checkFailed = false;
+              $scope.checkSuccess1 = false;
+              $scope.checkFailed1 = false;
+              $scope.checkSuccess2 = false;
+              $scope.checkFailed2 = false;
+              $scope.checking = true;
+              $modalInstance.close();
+            }, function (response) {
+              toaster.pop('error', '错误', response.data);
+              $modalInstance.close();
+            });
+          };
+
+          $scope.cancel = function () {
+            $modalInstance.close();
+          };
+        }]);
+
+  // 设置密保问题Controller
+  app.register.controller('UserQuestionCtrl',
+      ['$scope', '$modalInstance', 'user', 'User', 'toaster',
+        function ($scope, $modalInstance, user, User, toaster) {
+          //查询所有的密保问题
+          $scope.pageInfo = {page: 1, size: 100};
+          User.getAllSecQuestion({pageInfo: $scope.pageInfo}, {},
+              function (data) {
+                $scope.secQuestions = data.content;
+                //查询当前用户密保问题
+                User.getUserQuestion(function (data) {
+                  $scope.uq[0] = data[0];
+                  $scope.uq[1] = data[1];
+                });
+              });
+          //选择问题 校验
+          $scope.checkSuccess = false;
+          $scope.checkFailed = false;
+          $scope.checkSuccess2 = false;
+          $scope.checkFailed2 = false;
+          $scope.choose = function () {
+            if ($scope.uq[0].question != "") {
+              $scope.checkSuccess = true;
+              $scope.checkFailed = false;
+            } else {
+              $scope.checkSuccess = false;
+              $scope.checkFailed = true;
+            }
+          }
+
+          $scope.choose1 = function () {
+            if ($scope.uq[1].question != "") {
+              $scope.checkSuccess2 = true;
+              $scope.checkFailed2 = false;
+            } else {
+              $scope.checkSuccess2 = false;
+              $scope.checkFailed2 = true;
+            }
+          }
+
+          //答案校验 不超过30个字符
+          $scope.checkSuccess1 = false;
+          $scope.checkFailed1 = false;
+          $scope.checkFailed1_1 = false;
+          $scope.checkSuccess3 = false;
+          $scope.checkFailed3 = false;
+          $scope.checkFailed3_1 = false;
+          $scope.inputAnswer = function () {
+            if ($scope.uq[0].answer == null) {
+              $scope.checkSuccess1 = false;
+              $scope.checkFailed1 = true;
+              $scope.checkFailed1_1 = false;
+              return;
+            }
+            if ($scope.uq[0].answer.length > 30) {
+              $scope.checkSuccess1 = false;
+              $scope.checkFailed1 = false;
+              $scope.checkFailed1_1 = true;
+              return;
+            }
+            $scope.checkSuccess1 = true;
+            $scope.checkFailed1 = false;
+            $scope.checkFailed1_1 = false;
+          }
+
+          $scope.inputAnswer1 = function () {
+            if ($scope.uq[1].answer == null) {
+              $scope.checkSuccess3 = false;
+              $scope.checkFailed3 = true;
+              $scope.checkFailed3_1 = false;
+              return;
+            }
+            if ($scope.uq[1].answer.length > 30) {
+              $scope.checkSuccess3 = false;
+              $scope.checkFailed3 = false;
+              $scope.checkFailed3_1 = true;
+              return;
+            }
+            $scope.checkSuccess3 = true;
+            $scope.checkFailed3 = false;
+            $scope.checkFailed3_1 = false;
+          }
+
+          //保存密保
+          $scope.ok = function () {
+            var arr = [];
+            for (var key in $scope.uq) {
+              $scope.uq[key].sort = Number(key) + 1;
+              arr[key] = $scope.uq[key];
+            }
+            User.updateUserQuestion({}, arr, function () {
+              toaster.pop('success', '成功', '密保问题设置成功。');
+              $modalInstance.close();
+              $scope.uq = null;
+              $scope.checkSuccess = false;
+              $scope.checkFailed = false;
+              $scope.checkSuccess1 = false;
+              $scope.checkFailed1 = false;
+              $scope.checkSuccess2 = false;
+              $scope.checkFailed2 = false;
+              $scope.checkSuccess3 = false;
+              $scope.checkFailed3 = false;
+              $scope.checkFailed3_1 = false;
+              $scope.checkFailed1_1 = false;
+            }, function (response) {
+              toaster.pop('error', '错误', response.data);
+              $modalInstance.close();
+            });
+          };
+          $scope.cancel = function () {
+            $modalInstance.close();
+          };
+        }]);
+
+  // 实名认证Controller
+  app.register.controller('UserRealAuthCtrl',
+      ['$scope', '$modalInstance', 'user', 'User', 'toaster',
+        function ($scope, $modalInstance, user, User, toaster) {
+          $scope.user = user;
+          //姓名验证  不超过20个字符
+          $scope.checkSuccess = false;
+          $scope.checkFailed = false;
+          $scope.checkUserName = function (userName) {
+            if (userName == null) {
+              //toaster.pop('error', '请输入您的真实姓名');
+              $scope.checkSuccess = false;
+              $scope.checkFailed = true;
+              return;
+            } else if (userName.length > 20) {
+              //toaster.pop('error', '请勿超过20个字符');
+              $scope.checkSuccess = false;
+              $scope.checkFailed_1 = true;
+              return;
+            } else {
+              $scope.checkSuccess = true;
+              $scope.checkFailed = false;
+              $scope.checkFailed_1 = false;
+            }
+          }
+
+          //检查身份证
+          $scope.checkSuccess1 = false;
+          $scope.checkFailed1 = false;
+          $scope.checkUserIdcode = function (userIdcode) {
+            if (userIdcode == null) {
+              //toaster.pop('error', '请输入您的身份证号');
+              $scope.checkSuccess1 = false;
+              $scope.checkFailed1 = true;
+              return;
+            } else if (userIdcode.length != 18) {
+              //toaster.pop('error', '请输入18位的身份证号');
+              $scope.checkSuccess1 = false;
+              $scope.checkFailed1_1 = true;
+              return;
+            } else {
+              $scope.checkSuccess1 = true;
+              $scope.checkFailed1 = false;
+              $scope.checkFailed1_1 = false;
+            }
+          }
+
+          //图片上传
+          $scope.checkSuccess2 = false;
+          $scope.onUploadID = function ($data) {
+            if (!$data || !$data.path) {
+              toaster.pop('error', '图片上传失败');
+              return;
+            }
+            $scope.user.idImgUrl = $data.path;
+            $scope.checkSuccess2 = true;
+          };
+
+          //保存
+          $scope.ok = function () {
+            User.updateRealAuth({
+              userName: $scope.user.userName,
+              userIdcode: $scope.user.userIdcode,
+              idImgUrl: $scope.user.idImgUrl
+            }, {}, function () {
+              toaster.pop('success', '成功', '身份信息提交成功。');
+              $modalInstance.close();
+              $scope.checkSuccess2 = false;
+              $scope.checkSuccess1 = false;
+              $scope.checkFailed1 = false;
+              $scope.checkSuccess = false;
+              $scope.checkFailed = false;
+              location.reload();
+            }, function (response) {
+              toaster.pop('error', '错误', response.data);
+              $modalInstance.close();
+            });
+          };
+
+          $scope.cancel = function () {
+            $modalInstance.close();
+          };
+        }]);
+
 });

+ 26 - 1
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_index_ctrl.js

@@ -4,7 +4,7 @@
  */
 define(['app/app', 'calendar'], function(app) {
     'use strict';
-    app.register.controller('vendorIndexCtrl', ['$scope', 'toaster', 'VendorService', '$rootScope', 'News', '$filter', function($scope, toaster, VendorService, $rootScope, News, $filter) {
+    app.register.controller('vendorIndexCtrl', ['$scope', 'toaster', 'VendorService', '$rootScope', 'News', '$filter','$modal', function($scope, toaster, VendorService, $rootScope, News, $filter,$modal) {
         $rootScope.active = 'index';
         VendorService.getVendorInfo(null, function(data){
             $scope.vendor = data;
@@ -35,6 +35,31 @@ define(['app/app', 'calendar'], function(app) {
         // }, function (res) {
         //
         // });
+
+      //安全设置提醒框
+      $scope.openHomeCenterModel = function() {
+        var modalInstance = $modal.open({
+          animation: true,
+          templateUrl: $rootScope.rootPath + '/static/view/usercenter/modal/homeCenter_modal.html',
+          controller:'homeModalCtrl'
+        });
+        modalInstance.result.then(function(){
+        }, function(){
+        });
+      }
+
+      //安全级别
+      if(!($scope.userInfo.pwdEnable && ($scope.userInfo.haveUserQuestion || ($scope.userInfo.userEmail==null?false:true)))){
+        $scope.openHomeCenterModel();
+      }
         
     }]);
+
+  app.register.controller('homeModalCtrl', ['$scope',  '$modalInstance', 'toaster', '$http', 'ShippingAddress','$state', function($scope, $modalInstance, toaster, $http, ShippingAddress,$state){
+    console.info($scope.userInfo);
+    $scope.goLink = function(op){
+      $state.go('vendor_account_management',{op:op});
+      $modalInstance.dismiss('cancel');
+    }
+  }]);
 });

+ 809 - 578
src/main/webapp/resources/view/vendor/forstore/vendor_account_management.html

@@ -1,618 +1,849 @@
 <style>
-    .count .count01 {
-        display: block;
-    }
-    /*account*/
-    .user-role>.role-item{
-        float: left;
-    }
+  .count .count01 {
+    display: block;
+  }
 
-    .user-role>.role-item>.icon{
-        text-align: center;
-        color: #333;
-        padding: 1px 3px;
-        border-radius: 50%;
-        border: 1px solid #333;
-    }
+  /*account*/
+  .user-role > .role-item {
+    float: left;
+  }
 
-    .user-role>.role-item>.icon.info{
-        color: #56a022;
-        border: 1px solid #56a022;
-    }
+  .user-role > .role-item > .icon {
+    text-align: center;
+    color: #333;
+    padding: 1px 3px;
+    border-radius: 50%;
+    border: 1px solid #333;
+  }
 
-    .user-role>.role-item>.icon.warning{
-        color: #8a6d3b;
-        border: 1px solid #8a6d3b;
-    }
-    .row-operator>.operator-menu a:hover{
-        color: #fff;
-    }
-    .row-operator>.operator-menu{
-        right: 100%;
-        left: inherit;
-    }
-    .row-operator2 {
-        position: relative;
-    }
+  .user-role > .role-item > .icon.info {
+    color: #56a022;
+    border: 1px solid #56a022;
+  }
 
-    .row-operator2>.operator-menu2 {
-        position: absolute;
-        width: 140px;
-        height: 60;
-        line-height: 30px;
-        padding: 0 10px;
-        top: 30;
-        background-color: #333;
-        border-radius: 0 3px 3px 0;
-        opacity: 0;
-        right: 0;
-    }
+  .user-role > .role-item > .icon.warning {
+    color: #8a6d3b;
+    border: 1px solid #8a6d3b;
+  }
 
-    .row-operator2>.operator-menu2 a {
-        color: #fff;
-    }
+  .row-operator > .operator-menu a:hover {
+    color: #fff;
+  }
 
-    .row-operator2>.operator-menu2 a:hover {
-        color: #56a022;
-    }
+  .row-operator > .operator-menu {
+    right: 100%;
+    left: inherit;
+  }
 
-    .row-operator2:hover>.operator-menu2 {
-        z-index:100;
-        height: 60px;
-        opacity: .75;
-        -webkit-transition: all 0s ease-in-out;
-        -moz-transition: all 0s ease-in-out;
-        transition: all 0s ease-in-out;
-    }
+  .row-operator2 {
+    position: relative;
+  }
 
-    .row-operator2>.operator-menu3 {
-        position: absolute;
-        width: 125px;
-        height: 60;
-        line-height: 30px;
-        padding: 0 10px;
-        top: 30;
-        background-color: #333;
-        border-radius: 0 3px 3px 0;
-        opacity: 0;
-    }
+  .row-operator2 > .operator-menu2 {
+    position: absolute;
+    width: 140px;
+    height: 60;
+    line-height: 30px;
+    padding: 0 10px;
+    top: 30;
+    background-color: #333;
+    border-radius: 0 3px 3px 0;
+    opacity: 0;
+    right: 0;
+  }
 
-    .row-operator2>.operator-menu3 a {
-        color: #fff;
-    }
+  .row-operator2 > .operator-menu2 a {
+    color: #fff;
+  }
 
-    .row-operator2>.operator-menu3 a:hover {
-        color: #56a022;
-    }
+  .row-operator2 > .operator-menu2 a:hover {
+    color: #56a022;
+  }
 
-    .row-operator2:hover>.operator-menu3 {
-        z-index:100;
-        height: 40px;
-        opacity: .75;
-        -webkit-transition: all 0s ease-in-out;
-        -moz-transition: all 0s ease-in-out;
-        transition: all 0s ease-in-out;
-    }
-    .title-div .row-operator2 ul li a{
-        color: #fff;
-    }
-    .title-div .row-operator2 ul li a:hover{
-        color: #fff;
-    }
-    .title-div .pull-right{
-        float: right;
-        margin-right: 15px;
-        font-weight: normal;
-    }
-    .title-div .pull-right a{
-        font-weight: normal;
-        font-size: 14px;
-        color: #5078cb;
-    }
-    .member-list.table>tbody>tr{
-        height: 50px;
-    }
-    .public-tab.table>thead>tr>th{
-        border-bottom: #e8e8e8 1px solid !important;
-    }
-    .member-list.table>tbody>tr>td a{
-        font-size: 14px;
-        color: #5078cb;
-    }
-    .member-list.table>tbody>tr>td a:hover{
-        color: #5078cb;
-    }
-    .user-list{
-        padding-bottom: 50px;
-    }
-    .member-list{
-        margin-bottom: 20px;
-    }
-    .user-list .search .form-control{
-        height: 36px;
-        border: #bfbfbf 1px solid;
-        font-size: 14px;
-        margin-left: 5px;
-        margin-top: 10px;
-    }
-    .user-list .search .input-group-addon{
-        width: 70px;
-        height: 36px;
-        display: inline-block;
-        background: #5078cb;
-        font-size: 16px;
-        text-align: center;
-        line-height: 36px;
-        color: #fff;
-        padding: 0;
-        border: none;
-        border-radius: 0;
-        position: absolute;
-        top: 0;
-        right: -4px;
-    }
-    .user-list-head .row-operator2 a{
-        color: #5078cb;
-    }
-    .user-list-head .pull-right{
-        margin-right: 10px;
-    }
-   select.input-sm{
-        line-height: inherit;
-    }
-    .user-list-head .pull-right .btn-success[disabled]{
-        background: #5078cb;
-        border: none;
-    }
-    .user-list-head .pull-right .text-simple{
-        color: #5078cb;
-        font-weight: 500;
-    }
-    .user-list-head .row-operator2 ul li{
-        line-height: 30px;
-        padding: 0;
-        margin-top: 0;
-        text-align: center;
-    }
-    .user-list-head .row-operator2 ul li a{
-        color: #fff;
-    }
-    .user-list-head .row-operator2 ul li a:hover{
-        color: #fff;
-    }
-    .count_basic ul li div.fl{
-        width: 90px;
-    }
-    .basic_title span.fr button{
-        width: 40px;
-        line-height: 40px;
-        color: #5078cb;
-        text-align: center;
-        display: inline-block;
-        margin-right: 10px;
-        border: none;
-        background: none;
-        font-size: 14px;
-    }
-    .count_basic .col-sm-10 .form-control{
-        border-radius: inherit;
+  .row-operator2:hover > .operator-menu2 {
+    z-index: 100;
+    height: 60px;
+    opacity: .75;
+    -webkit-transition: all 0s ease-in-out;
+    -moz-transition: all 0s ease-in-out;
+    transition: all 0s ease-in-out;
+  }
+
+  .row-operator2 > .operator-menu3 {
+    position: absolute;
+    width: 125px;
+    height: 60;
+    line-height: 30px;
+    padding: 0 10px;
+    top: 30;
+    background-color: #333;
+    border-radius: 0 3px 3px 0;
+    opacity: 0;
+  }
+
+  .row-operator2 > .operator-menu3 a {
+    color: #fff;
+  }
+
+  .row-operator2 > .operator-menu3 a:hover {
+    color: #56a022;
+  }
+
+  .row-operator2:hover > .operator-menu3 {
+    z-index: 100;
+    height: 40px;
+    opacity: .75;
+    -webkit-transition: all 0s ease-in-out;
+    -moz-transition: all 0s ease-in-out;
+    transition: all 0s ease-in-out;
+  }
+
+  .title-div .row-operator2 ul li a {
+    color: #fff;
+  }
+
+  .title-div .row-operator2 ul li a:hover {
+    color: #fff;
+  }
+
+  .title-div .pull-right {
+    float: right;
+    margin-right: 15px;
+    font-weight: normal;
+  }
+
+  .title-div .pull-right a {
+    font-weight: normal;
+    font-size: 14px;
+    color: #5078cb;
+  }
+
+  .member-list.table > tbody > tr {
+    height: 50px;
+  }
+
+  .public-tab.table > thead > tr > th {
+    border-bottom: #e8e8e8 1px solid !important;
+  }
+
+  .member-list.table > tbody > tr > td a {
+    font-size: 14px;
+    color: #5078cb;
+  }
+
+  .member-list.table > tbody > tr > td a:hover {
+    color: #5078cb;
+  }
+
+  .user-list {
+    padding-bottom: 50px;
+  }
+
+  .member-list {
+    margin-bottom: 20px;
+  }
+
+  .user-list .search .form-control {
+    height: 36px;
+    border: #bfbfbf 1px solid;
+    font-size: 14px;
+    margin-left: 5px;
+    margin-top: 10px;
+  }
+
+  .user-list .search .input-group-addon {
+    width: 70px;
+    height: 36px;
+    display: inline-block;
+    background: #5078cb;
+    font-size: 16px;
+    text-align: center;
+    line-height: 36px;
+    color: #fff;
+    padding: 0;
+    border: none;
+    border-radius: 0;
+    position: absolute;
+    top: 0;
+    right: -4px;
+  }
+
+  .user-list-head .row-operator2 a {
+    color: #5078cb;
+  }
+
+  .user-list-head .pull-right {
+    margin-right: 10px;
+  }
+
+  select.input-sm {
+    line-height: inherit;
+  }
+
+  .user-list-head .pull-right .btn-success[disabled] {
+    background: #5078cb;
+    border: none;
+  }
+
+  .user-list-head .pull-right .text-simple {
+    color: #5078cb;
+    font-weight: 500;
+  }
+
+  .user-list-head .row-operator2 ul li {
+    line-height: 30px;
+    padding: 0;
+    margin-top: 0;
+    text-align: center;
+  }
+
+  .user-list-head .row-operator2 ul li a {
+    color: #fff;
+  }
+
+  .user-list-head .row-operator2 ul li a:hover {
+    color: #fff;
+  }
+
+  .count_basic ul li div.fl {
+    width: 90px;
+  }
+
+  .basic_title span.fr button {
+    width: 40px;
+    line-height: 40px;
+    color: #5078cb;
+    text-align: center;
+    display: inline-block;
+    margin-right: 10px;
+    border: none;
+    background: none;
+    font-size: 14px;
+  }
+
+  .count_basic .col-sm-10 .form-control {
+    border-radius: inherit;
+  }
+
+  /*新增*/
+    #account_manager a {
+      text-decoration: none;
     }
+
+  #account_manager a:hover {
+    text-decoration: none;
+  }
+  li .fi {
+    float: left;
+  }
+  li .fr {
+    width: 89%;
+    color: #666;
+  }
+  .rt_menu{
+    border-bottom: #e8e8e8 1px solid;
+    background: #ecf2fd;
+  }
+  .rt_menu span{
+    margin-left: 40px;
+    color: #666;
+    font-size: 14px;
+  }
+  .count01 .count-content{
+    width: 100%;
+    background: #fff;
+  }
+  .count01 .count-content ul{
+    width: 94%;
+  }
+  .count01 .count-content ul li{
+    border-bottom: none;
+  }
+  .count-content ul li div.fl{
+    width: 90px;
+  }
+  .rt_menu span.fr button{
+    width: 40px;
+    line-height: 40px;
+    color: #5078cb;
+    text-align: center;
+    display: inline-block;
+    margin-right: 10px;
+    border: none;
+    background: none;
+    font-size: 14px;
+  }
+  .count-content .col-sm-10 .form-control{
+    border-radius: inherit;
+    margin-top: 12px;
+  }
+  .count01 ul li span h5 img {
+    margin-top: 20px;
+    margin-left: 0;
+  }
+  .count01 ul li span h5 img.ok-icon {
+    margin-top: 25px;
+  }
+  .count01 ul li span>span {
+    color: #666;
+    margin-left: 0;
+  }
+  .count01 ul li >a {
+    background: #fff;
+    color: #5078cb;
+    text-align: center;
+    height: 30px;
+    line-height: 30px;
+    padding: 0 7px;
+    margin-top: 16px;
+    margin-right: 7px;
+  }
+  .count01 ul li >a.mall-btn-default {
+    background: #5078cb;
+    color: #fff;
+  }
+  .count01 ul li.safe-level>span >span {
+    display: inline-block;
+    height: 14px;
+    line-height: 14px;
+    background: rgb(255, 90, 0);
+    color: #fff;
+    margin-right: 1px;
+    width: 64px;
+    margin-left: 0px;
+    font-size: 12px;
+    text-align: center;
+    position: relative;
+    bottom: 1px;
+  }
+  .count01 ul li.safe-level>span >span:nth-child(3) {
+    background: rgb(255,171,44);
+  }
+  .count01 ul li.safe-level>span>i {
+    margin-left: 13px;
+    color: #666;
+  }
+  .count01 ul li.safe-level .last-login {
+    float: right;
+    font-size: 12px;
+    color: #666;
+    margin-right: 7px;
+  }
+  .count01 ul li span font {
+    font-size: 14px;
+    color: #333;
+    letter-spacing: 0;
+    margin-right: 0;
+  }
+  .count01 ul li span h5 {
+    width: 30px;
+  }
 </style>
 <!--右侧主体部分-->
 <div class="count user_right fr">
-    <!--安全设置-->
-    <div class="count_center">
-        <div class="com_tab">
-            <ul class="fl">
-                <li ng-class="{'active': tab=='base'}"><a ng-click="checkTab('base')">基本信息</a></li>
-                <li ng-class="{'active': tab=='safe'}"><a ng-click="checkTab('safe')">安全设置</a></li>
-                <!--<li ng-class="{'active': tab=='logistic'}"><a href="#" ng-click="checkTab('logistic')">收货地址</a></li>-->
+  <!--安全设置-->
+  <div class="count_center">
+    <div class="com_tab">
+      <ul class="fl">
+        <li ng-class="{'active': tab=='base'}"><a ng-click="checkTab('base')">基本信息</a></li>
+        <li ng-class="{'active': tab=='safe'}"><a ng-click="checkTab('safe')">安全设置</a></li>
+        <!--<li ng-class="{'active': tab=='logistic'}"><a href="#" ng-click="checkTab('logistic')">收货地址</a></li>-->
+      </ul>
+    </div>
+    <div class="count_list">
+      <!-- 基本信息-->
+      <div ng-if="tab=='base'" style="background: #fff">
+        <div class="count01" style="margin-bottom: 0 !important;">
+          <div class="count_basic">
+            <p class="basic_title"><span>企业信息</span>
+              <!--<span class="fr"><a href="#">修改</a><a href="#">提交</a><a href="#">删除</a></span>-->
+              <span class="fr" ng-if="userInfo.sys">
+                                <button ng-if=" !updateState"
+                                        ng-click="changeToUpdate(true)">修改</button>
+                                <button ng-if=" updateState" ng-click="saveUpdate()">保存</button>
+                                <button ng-if="updateState" ng-click="changeToUpdate(false)"
+                                        style="color: #f00">取消</button>
+                            </span>
+            </p>
+            <ul>
+              <li>
+                <div class="fl">企业全称</div>
+                <div class="col-sm-10" ng-if="updateState"><input type="text" class="form-control"
+                                                                  title="企业全称"
+                                                                  ng-disabled=" !updateState"
+                                                                  ng-model="enterpriseInfo.enName"/>
+                </div>
+                <div class="fr" ng-if="!updateState"><span
+                    ng-bind="enterpriseInfo.enName || '暂无信息'"></ span>
+                </div>
+              </li>
+              <li>
+                <div class="fl">企业简称</div>
+                <div class="col-sm-10" ng-if="updateState"><input type="text" class="form-control"
+                                                                  title="企业简称"
+                                                                  ng-disabled=" !updateState"
+                                                                  ng-model="enterpriseInfo.enShortname"/>
+                </div>
+                <div class="fr" ng-if="!updateState"><span
+                    ng-bind="enterpriseInfo.enShortname || '暂无信息'"></span></div>
+              </li>
+              <!--<li>
+                  <div class="fl">营业执照</div>
+                  <div class="fr"><img src="static/img/vendor/images/company_zz.jpg" alt=""></div>
+              </li>-->
+              <li>
+                <div class="fl">营业执照号</div>
+                <div class="col-sm-10" ng-if="updateState"><input type="text" class="form-control"
+                                                                  title="营业执照号" disabled="disable"
+                                                                  ng-model="enterpriseInfo.enBussinessCode"/>
+                </div>
+                <div class="fr" ng-if="!updateState"><span
+                    ng-bind="enterpriseInfo.enBussinessCode || '暂无信息'"></span></div>
+              </li>
+              <li>
+                <div class="fl">企业地址</div>
+                <div class="col-sm-10" ng-if="updateState"><input type="text" class="form-control"
+                                                                  title="企业地址"
+                                                                  ng-disabled=" !updateState"
+                                                                  ng-model="enterpriseInfo.enAddress"/>
+                </div>
+                <div class="fr" ng-if="!updateState"><span
+                    ng-bind="enterpriseInfo.enAddress || '暂无信息'"></span></div>
+              </li>
+              <li>
+                <div class="fl">官网地址</div>
+                <div class="col-sm-10" ng-if="updateState"><input type="text" class="form-control"
+                                                                  title="官网地址"
+                                                                  ng-disabled=" !updateState"
+                                                                  ng-model="enterpriseInfo.enUrl"/>
+                </div>
+                <div class="fr" ng-if="!updateState"><span
+                    ng-bind="enterpriseInfo.enUrl || '暂无信息'"></span></div>
+              </li>
+            </ul>
+            <!--<div class="deal-btn" ng-if="userInfo.sys">-->
+            <!--<button type="button" class="edit btn btn-primary" ng-if=" !updateState"  ng-click="changeToUpdate(true)">修改</button>-->
+            <!--<button type="button" class="edit btn btn-primary" ng-if=" updateState"  ng-click="saveUpdate()">保存</button>-->
+            <!--<button type="button" class="off btn btn-primary" ng-if="updateState" ng-click="changeToUpdate(false)">取消</button>-->
+            <!--</div>-->
+          </div>
+          <!--管理员信息-->
+          <div class="count_basic">
+            <p class="basic_title"><span>管理员信息</span>
+              <!--<span class="fr"><a href="#">修改</a><a href="#">提交</a><a href="#">删除</a></span>-->
+            </p>
+
+            <ul>
+              <li>
+                <div class="fl">姓&nbsp;&nbsp;名</div>
+                <div class="fr"><span ng-bind="adminInfo.userName || '暂无信息'"></span></div>
+              </li>
+              <!--<li>
+                  <div class="fl">身份证件号</div>
+                  <div class="fr"><span><input type="text" class="input02" placeholder="例如:36012199920025665" ></span></div>
+              </li>-->
+              <!--<li>
+                  <div class="fl">手持证件照</div>
+                  <div class="fr">
+                      <div class="card_photo">
+                          <span class="fl"><img src="static/img/vendor/images/card_img.png"/></span>
+                          <span class="fr"><a href="#"><img src="static/img/vendor/images/card_load.jpg"/></a><input type="file"></span>
+                      </div>
+                  </div>
+              </li>-->
+              <li>
+                <div class="fl">手机号</div>
+                <div class="fr"><span ng-bind="adminInfo.userTel || '暂无信息'"></span></div>
+              </li>
+              <!--<li>
+                  <div class="fl">手机验证码</div>
+                  <div class="fr">
+                      <input type="text" class="yzm01" placeholder="输入验证码">
+                      <a href="###" class="getyzm01">获取验证码<span></span></a>
+                  </div>
+              </li>-->
+              <li>
+                <div class="fl">邮箱</div>
+                <div class="fr"><span ng-bind="adminInfo.userEmail || '暂无信息'"></span></div>
+              </li>
+              <!--<li>
+                  <div class="fl">QQ号</div>
+                  <div class="fr"><span><input type="text" class="input02" placeholder="例如:1323232323" ></span></div>
+              </li>
+              <li>
+                  <div class="fl">居住地址</div>
+                  <div class="fr"><span class="map"><i class="icon-map-marker"></i><input type="text" class="input02" placeholder="填写总部所在地详细地址" ></span></div>
+              </li>-->
             </ul>
+          </div>
         </div>
-        <div class="count_list">
-            <!-- 基本信息-->
-            <div ng-if="tab=='base'" style="background: #fff">
-                <div class="count01" style="margin-bottom: 0 !important;">
-                    <div class="count_basic">
-                        <p class="basic_title"><span>企业信息</span>
-                            <!--<span class="fr"><a href="#">修改</a><a href="#">提交</a><a href="#">删除</a></span>-->
-                            <span class="fr" ng-if="userInfo.sys">
-                                <button ng-if=" !updateState"  ng-click="changeToUpdate(true)">修改</button>
-                                <button ng-if=" updateState"  ng-click="saveUpdate()">保存</button>
-                                <button ng-if="updateState" ng-click="changeToUpdate(false)" style="color: #f00">取消</button>
-                            </span>
-                        </p>
-                        <ul>
-                            <li>
-                                <div class="fl" >企业全称</div>
-                                <div class="col-sm-10" ng-if="updateState"><input type="text" class="form-control" title="企业全称" ng-disabled=" !updateState" ng-model="enterpriseInfo.enName"/></div>
-                                <div class="fr" ng-if="!updateState"><span ng-bind="enterpriseInfo.enName || '暂无信息'"></  span></div>
-                            </li>
-                            <li>
-                                <div class="fl">企业简称</div>
-                                <div class="col-sm-10" ng-if="updateState"><input type="text" class="form-control" title="企业简称" ng-disabled=" !updateState" ng-model="enterpriseInfo.enShortname"/></div>
-                                <div class="fr" ng-if="!updateState"><span ng-bind="enterpriseInfo.enShortname || '暂无信息'"></span></div>
-                            </li>
-                            <!--<li>
-                                <div class="fl">营业执照</div>
-                                <div class="fr"><img src="static/img/vendor/images/company_zz.jpg" alt=""></div>
-                            </li>-->
-                            <li>
-                                <div class="fl" >营业执照号</div>
-                                <div class="col-sm-10" ng-if="updateState"><input type="text" class="form-control" title="营业执照号" disabled="disable" ng-model="enterpriseInfo.enBussinessCode"/></div>
-                                <div class="fr" ng-if="!updateState"><span ng-bind="enterpriseInfo.enBussinessCode || '暂无信息'"></span></div>
-                            </li>
-                            <li>
-                                <div class="fl">企业地址</div>
-                                <div class="col-sm-10" ng-if="updateState"><input type="text" class="form-control" title="企业地址" ng-disabled=" !updateState" ng-model="enterpriseInfo.enAddress"/></div>
-                                <div class="fr" ng-if="!updateState"><span ng-bind="enterpriseInfo.enAddress || '暂无信息'"></span></div>
-                            </li>
-                            <li>
-                                <div class="fl">官网地址</div>
-                                <div class="col-sm-10" ng-if="updateState"><input type="text" class="form-control" title="官网地址" ng-disabled=" !updateState" ng-model="enterpriseInfo.enUrl"/></div>
-                                <div class="fr" ng-if="!updateState"><span ng-bind="enterpriseInfo.enUrl || '暂无信息'"></span></div>
-                            </li>
-                        </ul>
-                        <!--<div class="deal-btn" ng-if="userInfo.sys">-->
-                            <!--<button type="button" class="edit btn btn-primary" ng-if=" !updateState"  ng-click="changeToUpdate(true)">修改</button>-->
-                            <!--<button type="button" class="edit btn btn-primary" ng-if=" updateState"  ng-click="saveUpdate()">保存</button>-->
-                            <!--<button type="button" class="off btn btn-primary" ng-if="updateState" ng-click="changeToUpdate(false)">取消</button>-->
-                        <!--</div>-->
-                    </div>
-                    <!--管理员信息-->
-                    <div class="count_basic">
-                        <p class="basic_title"><span>管理员信息</span><!--<span class="fr"><a href="#">修改</a><a href="#">提交</a><a href="#">删除</a></span>--></p>
-
-                        <ul>
-                            <li>
-                                <div class="fl">姓&nbsp;&nbsp;名</div>
-                                <div class="fr"><span ng-bind="adminInfo.userName || '暂无信息'"></span></div>
-                            </li>
-                            <!--<li>
-                                <div class="fl">身份证件号</div>
-                                <div class="fr"><span><input type="text" class="input02" placeholder="例如:36012199920025665" ></span></div>
-                            </li>-->
-                            <!--<li>
-                                <div class="fl">手持证件照</div>
-                                <div class="fr">
-                                    <div class="card_photo">
-                                        <span class="fl"><img src="static/img/vendor/images/card_img.png"/></span>
-                                        <span class="fr"><a href="#"><img src="static/img/vendor/images/card_load.jpg"/></a><input type="file"></span>
-                                    </div>
-                                </div>
-                            </li>-->
-                            <li>
-                                <div class="fl">手机号</div>
-                                <div class="fr"><span ng-bind="adminInfo.userTel || '暂无信息'"></span></div>
-                            </li>
-                            <!--<li>
-                                <div class="fl">手机验证码</div>
-                                <div class="fr">
-                                    <input type="text" class="yzm01" placeholder="输入验证码">
-                                    <a href="###" class="getyzm01">获取验证码<span></span></a>
-                                </div>
-                            </li>-->
-                            <li>
-                                <div class="fl">邮箱</div>
-                                <div class="fr"><span ng-bind="adminInfo.userEmail || '暂无信息'"></span></div>
-                            </li>
-                            <!--<li>
-                                <div class="fl">QQ号</div>
-                                <div class="fr"><span><input type="text" class="input02" placeholder="例如:1323232323" ></span></div>
-                            </li>
-                            <li>
-                                <div class="fl">居住地址</div>
-                                <div class="fr"><span class="map"><i class="icon-map-marker"></i><input type="text" class="input02" placeholder="填写总部所在地详细地址" ></span></div>
-                            </li>-->
-                        </ul>
+        <!--<div class="user-list">
+            <div class="user-list-head count_basic">
+                <div class="basic_title">
+                    <span>企业成员信息</span>&lt;!&ndash;<span class="fr"><a href="#">修改</a><a href="#">提交</a><a href="#">删除</a></span>&ndash;&gt;
+                    <span class="pull-right" ng-show="userInfo.sys">
+                        <a title="新增用户默认密码为111111" ng-show="adding == true" class="btn btn-success btn-sm" ng-disabled="newUserForm.$invalid" ng-click="addUser(newUser)" class="text-simple" style="color: #fff;">
+                            <i class="fa fa-user-plus fa-fw"></i>确定添加</a>
+                        <a ng-click="adding = false" ng-show="adding == true" class="text-simple"><i class="fa fa-user-plus fa-fw"></i>
+                            取消
+                        </a>
+                        &lt;!&ndash; 添加用户 start &ndash;&gt;
+                        <div class="row-operator2">
+                            <a ng-show="adding != true" class="text-simple operator-trigger" href="javascript:void(0);">
+                                <i class="fa fa-user-plus fa-fw"></i>
+                                添加用户
+                            </a>
+                            <ul ng-show="adding != true" class="list-unstyle list-inline operator-menu2">
+                                <li><a ng-click="adding = true">添加未注册用户</a></li>
+                                <li><a ng-click="addExistUser()">添加已注册用户</a></li>
+                            </ul>
+                        </div>
+                        &lt;!&ndash; 添加用户 end &ndash;&gt;
+                </span>
+                </div>
+             </div>
+            <form name="newUserForm">
+                <div class="search col-xs-6" style="float: right;">
+                    <div class="form-group form-group-sm has-feedback">
+                        <input type="search" class="form-control input-sm" ng-model="keyword"
+                               ng-search="onSearch(keyword)" placeholder="输入人员姓名、电话号码、邮箱或UU号进行搜索" style="width: 100%"/>
+                        <a class="btn input-group-addon" ng-click="onSearch(keyword)">搜索</a>
                     </div>
                 </div>
-                <!--<div class="user-list">
-                    <div class="user-list-head count_basic">
-                        <div class="basic_title">
-                            <span>企业成员信息</span>&lt;!&ndash;<span class="fr"><a href="#">修改</a><a href="#">提交</a><a href="#">删除</a></span>&ndash;&gt;
-                            <span class="pull-right" ng-show="userInfo.sys">
-                                <a title="新增用户默认密码为111111" ng-show="adding == true" class="btn btn-success btn-sm" ng-disabled="newUserForm.$invalid" ng-click="addUser(newUser)" class="text-simple" style="color: #fff;">
-                                    <i class="fa fa-user-plus fa-fw"></i>确定添加</a>
-                                <a ng-click="adding = false" ng-show="adding == true" class="text-simple"><i class="fa fa-user-plus fa-fw"></i>
-                                    取消
-                                </a>
-                                &lt;!&ndash; 添加用户 start &ndash;&gt;
-                                <div class="row-operator2">
-                                    <a ng-show="adding != true" class="text-simple operator-trigger" href="javascript:void(0);">
-                                        <i class="fa fa-user-plus fa-fw"></i>
-                                        添加用户
-                                    </a>
-                                    <ul ng-show="adding != true" class="list-unstyle list-inline operator-menu2">
-                                        <li><a ng-click="adding = true">添加未注册用户</a></li>
-                                        <li><a ng-click="addExistUser()">添加已注册用户</a></li>
-                                    </ul>
-                                </div>
-                                &lt;!&ndash; 添加用户 end &ndash;&gt;
-                        </span>
-                        </div>
-                     </div>
-                    <form name="newUserForm">
-                        <div class="search col-xs-6" style="float: right;">
-                            <div class="form-group form-group-sm has-feedback">
-                                <input type="search" class="form-control input-sm" ng-model="keyword"
-                                       ng-search="onSearch(keyword)" placeholder="输入人员姓名、电话号码、邮箱或UU号进行搜索" style="width: 100%"/>
-                                <a class="btn input-group-addon" ng-click="onSearch(keyword)">搜索</a>
-                            </div>
-                        </div>
-                        <table ng-table="tableParams" class="member-list public-tab table" style="margin-top: 10px;">
-                            <thead>
-                                <tr>
-                                    <th width="120">uu号</th>
-                                    <th width="120">姓名</th>
-                                    <th width="80">性别</th>
-                                    <th width="120">电话</th>
-                                    <th width="140">邮箱</th>
-                                    <th width="100">角色</th>
-                                    <th width="80">&nbsp;</th>
-                                    &lt;!&ndash;<th width="50" ng-show="active=='chargeapply'">操作</th>&ndash;&gt;
-                                </tr>
-                            </thead>
-                            <tbody>
-                                <tr ng-show="adding">
-                                    <td class="text-center">
-                                        <div style="line-height: 30px;">系统生成</div>
-                                    </td>
-                                    <td class="text-center"><input ng-model="newUser.userName"
-                                                                   class="form-control input-sm" required type="text"
-                                                                   placeholder="用户名"></td>
-                                    <td class="text-center"><select ng-model="newUser.userSex"
-                                                                    class="form-control input-sm" ng-init="newUser.userSex='M'" style="width: 80px;">
-                                        <option value="F">女</option>
-                                        <option value="M">男</option>
-                                    </select>
-                                    </td>
-                                    <td class="text-center"
-                                        ng-class="{'has-error': userTelError, 'has-success': userTelSuccess}">
-                                        <input ng-model="newUser.userTel"
-                                               ng-blur="telValid(newUser.userTel)" required name="newUserTel"
-                                               class="form-control input-sm" ng-pattern="/^1[3|4|5|7|8]\d{9}$/" type="text" placeholder="手机号">
-                                    </td>
-                                    <td class="text-center"
-                                        ng-class="{'has-error': userEmailError, 'has-success': userEmailSuccess}">
-                                        <input ng-model="newUser.userEmail" ng-pattern="/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/"
-                                               ng-blur="emailValid(newUser.userEmail)" required
-                                               name="newUserEmail" class="form-control input-sm" type="text"
-                                               placeholder="邮箱">
-                                    </td>
-                                    <td colspan="2"></td>
-                                </tr>
-                            </tbody>
-                            <tbody>
-                                <tr ng-repeat="user in users" class="text-center">
-                                    <td class="text-center" ng-bind="user.userUU"></td>
-                                    <td class="text-center" ng-bind="user.userName"></td>
-                                    <td class="text-center" ng-bind="user.userSex == 'F' ? '女' : '男'"></td>
-                                    <td class="text-center" ng-bind="user.userTel"></td>
-                                    <td class="text-center" ng-bind="user.userEmail"></td>
-                                    <td class="user-role">
-                                        <div class="role-item" ng-repeat="role in user.roles"
-                                             title="{{role.desc}}">
-                                        <span class="icon"
-                                              ng-class="{'info':role.issys == 1,'danger':role.isdefault == 0}"
-                                              ng-bind="role.desc | firstchar"></span>
-                                        </div>
-                                    </td>
-                                    <td>
-                                        &lt;!&ndash;<a class="operator-trigger" href="javascript:void(0);"><i class="fa fa-pencil fa-lg" ng-show="(userInfo.sys && enterprise.enAdminuu != user.userUU) || users.length == 1"></i></a>&ndash;&gt;
-                                        <ul class="list-unstyle list-inline operator-menu" ng-show="(userInfo.sys && enterprise.enAdminuu != user.userUU)">
-                                            &lt;!&ndash;<li><a ng-click="editUserRole(u)"><i class="fa fa-fw fa-pencil-square-o" style="color: #fff"></i>编辑</a></li>&ndash;&gt;
-                                            <li><a ng-click="removeUser(user)" ng-if="user.userUU != userInfo.userUU" title="删除"><i class="fa fa-fw fa-trash-o" style="color: #fff"></i>删除</a></li>
-                                        </ul>
-                                    </td>
-                                </tr>
-                            </tbody>
-                        </table>
-                    </form>
-                </div>-->
-            </div>
-            </div>
-            <!--安全设置-->
-            <div class="count01 clearfix" ng-if="tab=='safe'">
-                <div class="rt_menu"><span>您的安全服务</span></div>
-                <ul>
-                    <li>
-                            <span>安全等级
-                                <span><b>中</b><em><i style="width: 20%;"></i></em></span>
-                                <img src="static/img/vendor/images/safe.png"/> <!--完成<a href="#"> 密保设置</a>,提升账户安全。-->
-                            </span>
-                    </li>
-                    <li>
-                            <span>
-                                <h5><img src="static/img/vendor/images/ok.png"/><p>已完成</p></h5>
-                                <font>身份认证</font>
-                                <span class="gray">用于提升账号的安全性和信任级别。认证后的有卖家记录的账号不能修改认证信息。</span>
-                            </span>
-                        <!--<a href="#">查看</a>-->
-                    </li>
-                    <li>
-                            <span>
-                                <h5><img src="static/img/vendor/images/ok.png"/><p>已完成</p></h5>
-                                <font>登录密码</font>
-                                <span class="gray">安全性高的密码可以使账号更安全。建议您定期更换密码,且设置一个包含数字和字母,并长度超过6位以上的密码。</span>
-                            </span>
-                        <a ng-click="updatePassword()">设置</a>
-                    </li>
-                    <li>
-                            <span>
-                                <h5><img src="static/img/vendor/images/ok.png"/><p>已完成</p></h5>
-                                <font>密保问题</font>
-                                <span class="gray">是您找回登录密码的方式之一。建议您设置一个容易记住,且最不容易被他人获取的问题及答案,更有效保障您的密...</span>
-                            </span>
-                        <!--<a href="#">维护</a>-->
-                    </li>
-                    <li>
-                            <span>
-                                <h5><img src="static/img/vendor/images/ok.png"/><p>已完成</p></h5>
-                                <font>绑定手机</font>
-                                <span class="gray">绑定手机后,您即可享受淘宝丰富的手机服务,如手机找回密码等。</span>
-                            </span>
-                        <!--<a href="#">修改</a>-->
-                    </li>
-                </ul>
-            </div>
-            <!--权限管理-->
-            <div class="count01 clearfix" ng-if="tab=='auth'">
-                <div class="power_title">员工账号及权限管理</div>
-                <dl class="power_list">
-                    <dt>
-                        <span>序号</span>
-                        <span>账号</span>
-                        <span>姓名</span>
-                        <span>允许上架</span>
-                        <span>允许下架</span>
-                        <span>允许申请器件</span>
-                        <span>允许维护品牌</span>
-                    </dt>
-                    <p class="height16">&nbsp;</p>
-                    <dd>
-                        <span>01</span>
-                        <span>ouxianqin</span>
-                        <span>张三</span>
-                        <span><input type="checkbox" name="checkbox" id="check01"/><label for="check01"></label></span>
-                        <span><input type="checkbox" name="checkbox" id="check02"/><label for="check02"></label></span>
-                        <span><input type="checkbox" name="checkbox" id="check03"/><label for="check03"></label></span>
-                        <span><input type="checkbox" name="checkbox" id="check04"/><label for="check04"></label></span>
-                    </dd>
-                    <dd>
-                        <span>01</span>
-                        <span>ouxianqin</span>
-                        <span>张三</span>
-                        <span><input type="checkbox" name="checkbox" id="check05"/><label for="check05"></label></span>
-                        <span><input type="checkbox" name="checkbox" id="check06"/><label for="check06"></label></span>
-                        <span><input type="checkbox" name="checkbox" id="check07"/><label for="check07"></label></span>
-                        <span><input type="checkbox" name="checkbox" id="check08"/><label for="check08"></label></span>
-                    </dd>
-                    <dd><span><a href="#">+添加账号</a></span></dd>
-                    <dd class="power_btn">
-                        <span><a href="#" class="p_off fl">取消</a><a href="#" class="p_save fr">提交更改</a></span>
-                    </dd>
-                </dl>
-            </div>
-        </div>
-        <!--收货地址-->
-        <div class="logistic-content" ng-if="tab=='logistic'">
-            <div class="menu-title row">现有收货地址<span>已保存<em>4</em>条,还能新增<em>16</em>条地址</span></div>
-            <div class="add-log row"><button><i class="fa fa-plus-circle"></i>新增收货地址</button></div>
-            <div class="log-tab">
-                <table class="table">
+                <table ng-table="tableParams" class="member-list public-tab table" style="margin-top: 10px;">
                     <thead>
                         <tr>
-                            <th width="100">联系人</th>
-                            <th width="400">地址</th>
-                            <th width="150">联系电话</th>
-                            <th width="80">操作</th>
-                            <th width="100"></th>
+                            <th width="120">uu号</th>
+                            <th width="120">姓名</th>
+                            <th width="80">性别</th>
+                            <th width="120">电话</th>
+                            <th width="140">邮箱</th>
+                            <th width="100">角色</th>
+                            <th width="80">&nbsp;</th>
+                            &lt;!&ndash;<th width="50" ng-show="active=='chargeapply'">操作</th>&ndash;&gt;
                         </tr>
                     </thead>
                     <tbody>
-                        <tr>
-                            <td class="text-left">陈广东省深圳市南山区</td>
-                            <td class="text-left">
-                                <div>广东省  深圳市  南山区山区陈广东省深圳市南山区山区陈广东省深圳市南山区东省深圳市南</div>
+                        <tr ng-show="adding">
+                            <td class="text-center">
+                                <div style="line-height: 30px;">系统生成</div>
                             </td>
-                            <td>13135656464</td>
-                            <td><a ng-click="">修改</a>|<a ng-click="">删除</a></td>
-                            <td>
-                                <button>默认地址</button>
+                            <td class="text-center"><input ng-model="newUser.userName"
+                                                           class="form-control input-sm" required type="text"
+                                                           placeholder="用户名"></td>
+                            <td class="text-center"><select ng-model="newUser.userSex"
+                                                            class="form-control input-sm" ng-init="newUser.userSex='M'" style="width: 80px;">
+                                <option value="F">女</option>
+                                <option value="M">男</option>
+                            </select>
                             </td>
+                            <td class="text-center"
+                                ng-class="{'has-error': userTelError, 'has-success': userTelSuccess}">
+                                <input ng-model="newUser.userTel"
+                                       ng-blur="telValid(newUser.userTel)" required name="newUserTel"
+                                       class="form-control input-sm" ng-pattern="/^1[3|4|5|7|8]\d{9}$/" type="text" placeholder="手机号">
+                            </td>
+                            <td class="text-center"
+                                ng-class="{'has-error': userEmailError, 'has-success': userEmailSuccess}">
+                                <input ng-model="newUser.userEmail" ng-pattern="/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/"
+                                       ng-blur="emailValid(newUser.userEmail)" required
+                                       name="newUserEmail" class="form-control input-sm" type="text"
+                                       placeholder="邮箱">
+                            </td>
+                            <td colspan="2"></td>
                         </tr>
-                        <tr>
-                            <td class="text-left">陈广东省深圳市南山区</td>
-                            <td class="text-left">
-                                <div>山区陈广东省深圳市南山区山区陈广东省深圳市南山区东省深圳市南</div>
+                    </tbody>
+                    <tbody>
+                        <tr ng-repeat="user in users" class="text-center">
+                            <td class="text-center" ng-bind="user.userUU"></td>
+                            <td class="text-center" ng-bind="user.userName"></td>
+                            <td class="text-center" ng-bind="user.userSex == 'F' ? '女' : '男'"></td>
+                            <td class="text-center" ng-bind="user.userTel"></td>
+                            <td class="text-center" ng-bind="user.userEmail"></td>
+                            <td class="user-role">
+                                <div class="role-item" ng-repeat="role in user.roles"
+                                     title="{{role.desc}}">
+                                <span class="icon"
+                                      ng-class="{'info':role.issys == 1,'danger':role.isdefault == 0}"
+                                      ng-bind="role.desc | firstchar"></span>
+                                </div>
                             </td>
-                            <td>13135656464</td>
-                            <td><a ng-click="">修改</a>|<a ng-click="">删除</a></td>
                             <td>
-                                <button class="default">设为默认</button>
+                                &lt;!&ndash;<a class="operator-trigger" href="javascript:void(0);"><i class="fa fa-pencil fa-lg" ng-show="(userInfo.sys && enterprise.enAdminuu != user.userUU) || users.length == 1"></i></a>&ndash;&gt;
+                                <ul class="list-unstyle list-inline operator-menu" ng-show="(userInfo.sys && enterprise.enAdminuu != user.userUU)">
+                                    &lt;!&ndash;<li><a ng-click="editUserRole(u)"><i class="fa fa-fw fa-pencil-square-o" style="color: #fff"></i>编辑</a></li>&ndash;&gt;
+                                    <li><a ng-click="removeUser(user)" ng-if="user.userUU != userInfo.userUU" title="删除"><i class="fa fa-fw fa-trash-o" style="color: #fff"></i>删除</a></li>
+                                </ul>
                             </td>
                         </tr>
                     </tbody>
                 </table>
-            </div>
-        </div>
+            </form>
+        </div>-->
+      </div>
+    </div>
+    <!--安全设置-->
+    <div class="count01 clearfix" ng-if="tab=='safe'">
+      <div class="rt_menu"><span>您的安全服务</span></div>
+      <ul>
+        <li class="safe-level">
+				<span>安全等级:
+					<span ng-if="userInfo.secLevel>=1">弱</span>
+					<span ng-if="userInfo.secLevel>=3">中</span>
+					<span ng-if="userInfo.secLevel>4">强</span>
+          <!--<i>中</i>-->
+          <!--完成<a href="javascript:void(0)"> 密保设置</a>,提升账户安全。-->
+				</span>
+          <div class="last-login">上次登录时间:<span>{{userInfo.lastLoginTime | date:'yyyy-MM-dd HH:MM:ss'}} </span>
+          </div>
+        </li>
+        <li ng-switch="userInfo.idEnable">
+				<span>
+					<h5 ng-switch-when="1"><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
+					<h5 ng-switch-when="0"><img src="static/img/user/images/safe.png"/></h5>
+					<h5 ng-switch-when="2"><img src="static/img/user/images/safe.png"/></h5>
+					<font>实名认证:</font>
+					<span>实名认证后,可通过实名信息找回支付密码、修改手机号等,提高账户安全性。</span>
+				</span>
+          <a ng-switch-when="0" ng-click="updateRealAuth()" class="mall-btn-default">立即设置</a>
+          <a ng-switch-when="1">审核通过</a>
+          <a ng-switch-when="2">待审核</a>
+        </li>
+        <li>
+				<span>
+					<h5 ng-show="userInfo.pwdEnable"><img class="ok-icon"
+                                                src="static/img/user/images/ok-account.png"/></h5>
+					<h5 ng-hide="userInfo.pwdEnable"><img src="static/img/user/images/safe.png"/></h5>
+					<font>登录密码:</font>
+					<span>安全性高的密码可以使账号更安全,建议您定期更换密码,并且设置一个包含数字和字母,长度超过8位以上的密码。</span>
+				</span>
+          <a ng-click="updatePassword()">修改</a>
+        </li>
+        <li>
+				<span>
+					<h5 ng-show="userInfo.haveUserQuestion"><img class="ok-icon"
+                                                       src="static/img/user/images/ok-account.png"/></h5>
+					<h5 ng-hide="userInfo.haveUserQuestion"><img src="static/img/user/images/safe.png"/></h5>
+					<font>密保问题:</font>
+					<span>是您找回登录密码的方式之一。建议您设置一个容易记住,且最不容易被他人获取的问题及答案,更有效保障您的密...</span>
+				</span>
+          <a ng-hide="userInfo.haveUserQuestion" ng-click="updateUserQuestion()"
+             class="mall-btn-default">立即设置</a>
+          <a ng-show="userInfo.haveUserQuestion" ng-click="updateUserQuestion()">修改</a>
+        </li>
+        <li>
+				<span>
+					<h5><img class="ok-icon" src="static/img/user/images/ok-account.png"/></h5>
+					<font>手机验证:</font>
+					<span>您绑定的手机:{{userInfo.userTel}}。若已丢失或停用,请立即更换,避免账户被盗。</span>
+				</span>
+          <a ng-click="updateUserTel()">修改</a>
+        </li>
+        <li>
+				<span>
+					<h5 ng-show="userInfo.userEmail==null?false:true"><img class="ok-icon"
+                                                                 src="static/img/user/images/ok-account.png"/></h5>
+					<h5 ng-hide="userInfo.userEmail==null?false:true"><img
+              src="static/img/user/images/safe.png"/></h5>
+					<font>邮箱认证:</font>
+					<span ng-show="userInfo.userEmail==null?false:true">{{userInfo.userEmail}}</span>
+					<span
+              ng-hide="userInfo.userEmail==null?false:true">绑定邮箱可帮助您找回登录密码,并可订阅获取最新的订单动态、促销信息。</span>
+				</span>
+          <a ng-show="userInfo.userEmail==null?false:true" ng-click="updateUserEmail()">修改</a>
+          <a ng-hide="userInfo.userEmail==null?false:true" ng-click="updateUserEmail()">立即设置</a>
+        </li>
+        <li>
+				<span>
+					<h5 ng-show="userInfo.havePayPwd"><img class="ok-icon"
+                                                 src="static/img/user/images/ok-account.png"/></h5>
+					<h5 ng-hide="userInfo.havePayPwd"><img src="static/img/user/images/safe.png"/></h5>
+					<font>支付密码:</font>
+					<span>在使用账户中余额或确认收货时,需输入支付密码。</span>
+				</span>
+          <a ng-hide="userInfo.havePayPwd" ng-click="updateUserPay()"
+             class="mall-btn-default">立即设置</a>
+          <a ng-show="userInfo.havePayPwd" ng-click="updateUserPay()">修改</a>
+        </li>
+      </ul>
+    </div>
+    <!--权限管理-->
+    <div class="count01 clearfix" ng-if="tab=='auth'">
+      <div class="power_title">员工账号及权限管理</div>
+      <dl class="power_list">
+        <dt>
+          <span>序号</span>
+          <span>账号</span>
+          <span>姓名</span>
+          <span>允许上架</span>
+          <span>允许下架</span>
+          <span>允许申请器件</span>
+          <span>允许维护品牌</span>
+        </dt>
+        <p class="height16">&nbsp;</p>
+        <dd>
+          <span>01</span>
+          <span>ouxianqin</span>
+          <span>张三</span>
+          <span><input type="checkbox" name="checkbox" id="check01"/><label
+              for="check01"></label></span>
+          <span><input type="checkbox" name="checkbox" id="check02"/><label
+              for="check02"></label></span>
+          <span><input type="checkbox" name="checkbox" id="check03"/><label
+              for="check03"></label></span>
+          <span><input type="checkbox" name="checkbox" id="check04"/><label
+              for="check04"></label></span>
+        </dd>
+        <dd>
+          <span>01</span>
+          <span>ouxianqin</span>
+          <span>张三</span>
+          <span><input type="checkbox" name="checkbox" id="check05"/><label
+              for="check05"></label></span>
+          <span><input type="checkbox" name="checkbox" id="check06"/><label
+              for="check06"></label></span>
+          <span><input type="checkbox" name="checkbox" id="check07"/><label
+              for="check07"></label></span>
+          <span><input type="checkbox" name="checkbox" id="check08"/><label
+              for="check08"></label></span>
+        </dd>
+        <dd><span><a href="#">+添加账号</a></span></dd>
+        <dd class="power_btn">
+          <span><a href="#" class="p_off fl">取消</a><a href="#" class="p_save fr">提交更改</a></span>
+        </dd>
+      </dl>
+    </div>
+  </div>
+  <!--收货地址-->
+  <div class="logistic-content" ng-if="tab=='logistic'">
+    <div class="menu-title row">现有收货地址<span>已保存<em>4</em>条,还能新增<em>16</em>条地址</span></div>
+    <div class="add-log row">
+      <button><i class="fa fa-plus-circle"></i>新增收货地址</button>
+    </div>
+    <div class="log-tab">
+      <table class="table">
+        <thead>
+        <tr>
+          <th width="100">联系人</th>
+          <th width="400">地址</th>
+          <th width="150">联系电话</th>
+          <th width="80">操作</th>
+          <th width="100"></th>
+        </tr>
+        </thead>
+        <tbody>
+        <tr>
+          <td class="text-left">陈广东省深圳市南山区</td>
+          <td class="text-left">
+            <div>广东省 深圳市 南山区山区陈广东省深圳市南山区山区陈广东省深圳市南山区东省深圳市南</div>
+          </td>
+          <td>13135656464</td>
+          <td><a ng-click="">修改</a>|<a ng-click="">删除</a></td>
+          <td>
+            <button>默认地址</button>
+          </td>
+        </tr>
+        <tr>
+          <td class="text-left">陈广东省深圳市南山区</td>
+          <td class="text-left">
+            <div>山区陈广东省深圳市南山区山区陈广东省深圳市南山区东省深圳市南</div>
+          </td>
+          <td>13135656464</td>
+          <td><a ng-click="">修改</a>|<a ng-click="">删除</a></td>
+          <td>
+            <button class="default">设为默认</button>
+          </td>
+        </tr>
+        </tbody>
+      </table>
     </div>
+  </div>
+</div>
 </div>
 <style>
-    .com-del-box{
-        position: fixed;
-        z-index: 2;
-        height: 152px;
-        opacity: 1;
-        background-color: white;
-        width: 310px;
-        -webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
-        box-shadow: 0 5px 15px rgba(0,0,0,.5);
-        margin: -155px 0 0 -75px;
-        top: 55%;
-        left: 50%;
-    }
-    .com-del-box .title{
-        height: 30px;
-        background-color: #5078cb;
-        text-align: right;
-        padding-right: 15px;
-        line-height: 30px;
-    }
-    .com-del-box .title a{
-        color: white;
-        font-size: 16px;
-    }
-    .com-del-box .content{
-        width: 100%;
-        text-align: center;
-        margin: 0 auto;
-    }
-    .com-del-box .content p{
-        line-height: 50px;
-        font-size: 14px;
-        padding-top: 10px;
-        padding-bottom: 10px;
-    }
-    .com-del-box .content p i{
-        color: #5078cb;
-        font-size: 16px;
-        margin-right: 10px;
-    }
-    .com-del-box .content div{
-        width: 100%;
-        text-align: center;
-        margin: 0 auto;
-    }
-    .com-del-box .content div a{
-        width: 55px;
-        height: 26px;
-        line-height: 26px;
-        display: inline-block;
-        text-align: center;
-        font-size: 14px;
-    }
-    .com-del-box .content div a:first-child{
-        background: #b4b5b9;
-        color: #333;
-        margin-right: 10px;
-    }
-    .com-del-box .content div a:last-child{
-        background: #5078cb;
-        color: #fff;
-    }
-    .com-del-box .content div a:hover{
-        background: #3f7ae3;
-        color: #fff;
-    }
+  .com-del-box {
+    position: fixed;
+    z-index: 2;
+    height: 152px;
+    opacity: 1;
+    background-color: white;
+    width: 310px;
+    -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
+    box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
+    margin: -155px 0 0 -75px;
+    top: 55%;
+    left: 50%;
+  }
+
+  .com-del-box .title {
+    height: 30px;
+    background-color: #5078cb;
+    text-align: right;
+    padding-right: 15px;
+    line-height: 30px;
+  }
+
+  .com-del-box .title a {
+    color: white;
+    font-size: 16px;
+  }
+
+  .com-del-box .content {
+    width: 100%;
+    text-align: center;
+    margin: 0 auto;
+  }
+
+  .com-del-box .content p {
+    line-height: 50px;
+    font-size: 14px;
+    padding-top: 10px;
+    padding-bottom: 10px;
+  }
+
+  .com-del-box .content p i {
+    color: #5078cb;
+    font-size: 16px;
+    margin-right: 10px;
+  }
+
+  .com-del-box .content div {
+    width: 100%;
+    text-align: center;
+    margin: 0 auto;
+  }
+
+  .com-del-box .content div a {
+    width: 55px;
+    height: 26px;
+    line-height: 26px;
+    display: inline-block;
+    text-align: center;
+    font-size: 14px;
+  }
+
+  .com-del-box .content div a:first-child {
+    background: #b4b5b9;
+    color: #333;
+    margin-right: 10px;
+  }
+
+  .com-del-box .content div a:last-child {
+    background: #5078cb;
+    color: #fff;
+  }
+
+  .com-del-box .content div a:hover {
+    background: #3f7ae3;
+    color: #fff;
+  }
 </style>
 <div class="com-del-box" style="display: none;">
-    <div class="title">
-        <a @click="delFlag=false"><i class="fa fa-close fa-lg"></i></a>
-    </div>
-    <div class="content">
-        <p><i class="fa fa-exclamation-circle"></i>是否删除此地址</p>
-        <div><a ng-click="">取消</a><a ng-click="">确认</a></div>
-    </div>
+  <div class="title">
+    <a @click="delFlag=false"><i class="fa fa-close fa-lg"></i></a>
+  </div>
+  <div class="content">
+    <p><i class="fa fa-exclamation-circle"></i>是否删除此地址</p>
+    <div><a ng-click="">取消</a><a ng-click="">确认</a></div>
+  </div>
 </div>

+ 4 - 4
src/main/webapp/resources/view/vendor/modal/updateUserQuestion.html

@@ -73,9 +73,9 @@
                 <!--
                 <input ng-model="uq[0].question" class="form-control input-sm" name="uq[0].question" required>
                 -->
-                <select class="form-control" ng-blur="choose()"  style="opacity: unset;" ng-repeat="info in secQuestions" ng-if="info.type==1"  ng-model="uq[0].question">
+                <select class="form-control" ng-blur="choose()"  style="opacity: unset;"  ng-model="uq[0].question">
                     <option value="">请选择一个问题</option>
-                    <option value="{{info.question}}">{{info.question}}</option>
+                    <option value="{{info.question}}" ng-repeat="info in secQuestions" ng-if="info.type==1">{{info.question}}</option>
                 </select>
             </div>
             <div class="col">
@@ -106,9 +106,9 @@
                 <!--
                 <input ng-model="uq[1].question"  class="form-control input-sm" name="uq[1].question" required>
                 -->
-                <select class="form-control" ng-blur="choose1()"  style="opacity: unset;" ng-repeat="info in secQuestions" ng-if="info.type==2"  ng-model="uq[1].question">
+                <select class="form-control" ng-blur="choose1()"  style="opacity: unset;"  ng-model="uq[1].question">
                     <option value="">请选择一个问题</option>
-                    <option value="{{info.question}}">{{info.question}}</option>
+                    <option value="{{info.question}}" ng-repeat="info in secQuestions" ng-if="info.type==2">{{info.question}}</option>
                 </select>
             </div>
             <div class="col">