Browse Source

安全设置

529010777@qq.com 8 years ago
parent
commit
d957a4a439

+ 15 - 6
src/main/java/com/uas/platform/b2c/common/account/controller/UserController.java

@@ -134,7 +134,9 @@ public class UserController {
 		if (!StringUtils.isEmpty(newPassword)) {
 			user.setPwdSecLevel(secLevel);
 			user = userService.updatePassword(user, password, newPassword);
-			user.setCurrentEnterprise(sysUser.getEnterprise().getUu());
+			if(sysUser.getEnterprise()!=null){
+				user.setCurrentEnterprise(sysUser.getEnterprise().getUu());
+			}
 			session.setAttribute("user", user);
 			SystemSession.setUser(user);
 			assert logger != null;
@@ -265,7 +267,9 @@ public class UserController {
 			}
 			user.setUserEmail(newUserEmail);
 			user = userService.save(user);
-			user.setCurrentEnterprise(sysUser.getEnterprise().getUu());
+			if(sysUser.getEnterprise()!=null){
+				user.setCurrentEnterprise(sysUser.getEnterprise().getUu());
+			}
 			session.setAttribute("user", user);
 			SystemSession.setUser(user);
 			assert logger != null;
@@ -397,7 +401,9 @@ public class UserController {
 			}
 			user.setUserTel(newUserTel);
 			user = userService.save(user);
-			user.setCurrentEnterprise(sysUser.getEnterprise().getUu());
+			if(sysUser.getEnterprise()!=null){
+				user.setCurrentEnterprise(sysUser.getEnterprise().getUu());
+			}
 			session.setAttribute("user", user);
 			SystemSession.setUser(user);
 			assert logger != null;
@@ -465,7 +471,9 @@ public class UserController {
 		User user = userService.findUserPwdByUserUU(sysUser.getUserUU());
 		if (!StringUtils.isEmpty(newUserPay)) {
 			user = userService.updateUserPay(user, userPay, newUserPay);
-			user.setCurrentEnterprise(sysUser.getEnterprise().getUu());
+			if(sysUser.getEnterprise()!=null){
+				user.setCurrentEnterprise(sysUser.getEnterprise().getUu());
+			}
 			session.setAttribute("user", user);
 			SystemSession.setUser(user);
 			assert logger != null;
@@ -529,8 +537,9 @@ public class UserController {
 			user.setIdEnable((short)2);
 			user.setIdDate(new Date());
 			user = userService.saveRealAuth(user);
-			user.setCurrentEnterprise(sysUser.getEnterprise().getUu());
-			request.getSession().setAttribute("user",user);
+			if(sysUser.getEnterprise()!=null){
+				user.setCurrentEnterprise(sysUser.getEnterprise().getUu());
+			}
 			SystemSession.setUser(user);
 			assert logger != null;
 			logger.log("用户信息", "提交实名认证信息,UU:" + sysUser.getUserUU());

+ 87 - 13
src/main/webapp/resources/js/usercenter/controllers/forstore/account_manager_ctrl.js

@@ -652,18 +652,20 @@ define(['app/app'], function (app) {
             }
           }
           //输入原密码后验证原密码是否正确
+          $scope.checkSuccess = false;
+          $scope.checkFailed = false;
           $scope.checkPassword = function (password) {
-            $scope.checking = true;
             $scope.checkSuccess = false;
             $scope.checkFailed = false;
-            //判断点击的是否在小键盘区域
+            if(!password){
+              $scope.checkFailed = true;
+              $scope.checkSuccess = 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;
             });
           };
@@ -730,6 +732,17 @@ define(['app/app'], function (app) {
 
           //修改密码
           $scope.ok = function () {
+            //原密码校验
+            if(!$scope.checkSuccess){
+              $scope.checkPassword($scope.user.password);
+            }
+            //新密码校验
+            $scope.checkNewPassword($scope.user.newPassword);
+            //再次输入密码校验
+            $scope.checkNewPassword1();
+            if(!$scope.checkSuccess || !$scope.checkSuccess1 || !$scope.checkSuccess2){
+                return;
+            }
             if ($scope.user.newPassword == $scope.user.password) {
               toaster.pop('error', '错误', '新密码与原密码相同');
               return;
@@ -756,10 +769,11 @@ define(['app/app'], function (app) {
                 $scope.checkSuccess2 = false;
                 $scope.checkFailed2 = false;
                 window.location.href = "user#/accountManager/sec";
+                window.location.reload();
                 $modalInstance.close();
               }, function (response) {
                 toaster.pop('error', '错误', response.data);
-               // $modalInstance.close();
+               $modalInstance.close();
               });
             } else {
               toaster.pop('error', '错误', '重复密码不一致');
@@ -870,7 +884,9 @@ define(['app/app'], function (app) {
           //校验验证码
           $scope.validCheckCode = function (checkCode) {
             if(!checkCode){
-                return;
+              $scope.checkSuccess2 = false;
+              $scope.checkFailed2 = true;
+                return false;
             }
             User.validCheckCode({checkCode: checkCode,newUserEmail:$scope.user.newUserEmail}, function (data) {
               var status = data.status;
@@ -887,6 +903,19 @@ define(['app/app'], function (app) {
 
           //修改邮箱地址
           $scope.ok = function () {
+            //原邮箱校验
+            if($scope.userInfo.userEmail && !$scope.checkSuccess ){
+              $scope.checkUserEmail($scope.user.userEmail);
+            }
+            //新邮箱校验
+            if(!$scope.checkSuccess1){
+              $scope.emailEnable($scope.user.newUserEmail);
+            }
+            //验证码
+            $scope.validCheckCode($scope.checkCode);
+            if((!$scope.checkSuccess && $scope.userInfo.userEmail)|| !$scope.checkSuccess1 || !$scope.checkSuccess2){
+              return;
+            }
             var param = {
               newUserEmail: $scope.user.newUserEmail,
               checkCode:$scope.checkCode
@@ -915,6 +944,7 @@ define(['app/app'], function (app) {
               $scope.checkFailed1 = false;
               $scope.sendSuccess = false;
               window.location.href = "user#/accountManager/sec";
+              window.location.reload();
               $modalInstance.close();
             }, function (response) {
               toaster.pop('error', '错误', response.data);
@@ -1020,6 +1050,8 @@ define(['app/app'], function (app) {
           //校验验证码
           $scope.validTelCheckCode = function (telCheckCode) {
             if(!telCheckCode){
+              $scope.checkSuccess2 = false;
+              $scope.checkFailed2 = true;
               return;
             }
             User.validTelCheckCode({telCheckCode: telCheckCode,newUserTel:$scope.user.newUserTel},
@@ -1038,6 +1070,19 @@ define(['app/app'], function (app) {
 
           //修改手机
           $scope.ok = function () {
+            //原手机校验
+            if(!$scope.checkSuccess){
+              $scope.checkUserTel($scope.user.userTel);
+            }
+            //新手机校验
+            if(!$scope.checkSuccess1){
+              $scope.telEnable($scope.user.newUserTel);
+            }
+            //验证码校验
+            $scope.validTelCheckCode($scope.checkCode);
+            if(!$scope.checkSuccess || !$scope.checkSuccess1 || !$scope.checkSuccess2){
+              return;
+            }
             if ($scope.user.newUserTel == $scope.user.userTel) {
               toaster.pop('error', '错误', '新手机号与旧手机号相同');
               return;
@@ -1062,6 +1107,7 @@ define(['app/app'], function (app) {
               $scope.codeSuccess = false;
               $scope.validSuccess = false;
               window.location.href = "user#/accountManager/sec";
+              window.location.reload();
               $modalInstance.close();
             }, function (response) {
               toaster.pop('error', '错误', response.data);
@@ -1159,8 +1205,9 @@ define(['app/app'], function (app) {
             }
           }
           //验证是否设置密码
+          $scope.isNewSuccess = false;
+          $scope.isNewFailed = false;
           $scope.checkHaveUserPay = function () {
-            $scope.userPayHidden = false;
             $scope.isNewSuccess = false;
             $scope.isNewFailed = true;
             User.checkHaveUserPay(function (data) {
@@ -1172,12 +1219,13 @@ define(['app/app'], function (app) {
                 $scope.newUserPayLabel = "密码";
                 $scope.isNewSuccess = true;
                 $scope.isNewFailed = false;
-                $scope.checking = false;
               }
             });
           }
 
           //校验原密码是否正确
+          $scope.checkFailed = false;
+          $scope.checkSuccess = false;
           $scope.checkUserPay = function (userPay) {
             if (userPay == null) {
               $scope.checkFailed = true;
@@ -1247,6 +1295,17 @@ define(['app/app'], function (app) {
 
           //支付密码
           $scope.ok = function () {
+            //原密码校验
+            if(!$scope.checkSuccess && $scope.userInfo.havePayPwd){
+              $scope.checkUserPay($scope.user.userPay);
+            }
+            //新密码校验
+            $scope.checkNewUserPay($scope.user.newUserPay);
+            //密码确认
+            $scope.checkNewUserPay1();
+            if((!$scope.checkSuccess && $scope.userInfo.havePayPwd) || !$scope.checkSuccess1 || !$scope.checkSuccess2){
+              return;
+            }
             if ($scope.checking && ($scope.user.newUserPay
                     == $scope.user.userPay)) {
               toaster.pop('error', '错误', '新密码与旧密码相同');
@@ -1267,6 +1326,7 @@ define(['app/app'], function (app) {
               $scope.checkFailed2 = false;
               $scope.checking = true;
               window.location.href = "user#/accountManager/sec";
+              window.location.reload();
               $modalInstance.close();
             }, function (response) {
               toaster.pop('error', '错误', response.data);
@@ -1407,6 +1467,7 @@ define(['app/app'], function (app) {
               $scope.checkFailed3_1 = false;
               $scope.checkFailed1_1 = false;
               window.location.href = "user#/accountManager/sec";
+              window.location.reload();
               $modalInstance.close();
             }, function (response) {
               toaster.pop('error', '错误', response.data);
@@ -1427,16 +1488,16 @@ define(['app/app'], function (app) {
           $scope.checkSuccess = false;
           $scope.checkFailed = false;
           $scope.checkUserName = function (userName) {
-            if (userName == null) {
+            if (!userName) {
               //toaster.pop('error', '请输入您的真实姓名');
               $scope.checkSuccess = false;
               $scope.checkFailed = true;
-              return;
+              return false;
             } else if (userName.length > 20) {
               //toaster.pop('error', '请勿超过20个字符');
               $scope.checkSuccess = false;
               $scope.checkFailed_1 = true;
-              return;
+              return false;
             } else {
               $scope.checkSuccess = true;
               $scope.checkFailed = false;
@@ -1454,13 +1515,13 @@ define(['app/app'], function (app) {
               $scope.checkSuccess1 = false;
               $scope.checkFailed1 = true;
               $scope.checkFailed1_1 = false;
-              return;
+              return false;
             } else if (userIdcode.length != 18) {
               //toaster.pop('error', '请输入18位的身份证号');
               $scope.checkSuccess1 = false;
               $scope.checkFailed1 = false;
               $scope.checkFailed1_1 = true;
-              return;
+              return false;
             } else {
               $scope.checkSuccess1 = true;
               $scope.checkFailed1 = false;
@@ -1498,6 +1559,18 @@ define(['app/app'], function (app) {
 		};
 		//保存
       $scope.ok = function () {
+        //姓名
+        $scope.checkUserName($scope.user.userName);
+        //身份证
+        $scope.checkUserIdcode($scope.user.userIdcode);
+        //身份证
+        if(!$scope.checkSuccess2){
+          toaster.pop('error', '错误', '请上传您的证件...');
+          return;
+        }
+        if(!$scope.checkSuccess || !$scope.checkSuccess1 || !$scope.checkSuccess2){
+          return;
+        }
         User.updateRealAuth({userName:$scope.user.userName,userIdcode:$scope.user.userIdcode,idImgUrl:$scope.user.idImgUrl},{},function(){
           toaster.pop('success', '成功', '身份信息提交成功。');
           $modalInstance.close();
@@ -1507,6 +1580,7 @@ define(['app/app'], function (app) {
           $scope.checkSuccess = false;
           $scope.checkFailed = false;
           window.location.href = "user#/accountManager/sec";
+          window.location.reload();
           $modalInstance.close();
         }, function(response){
           toaster.pop('error', '错误', response.data);

+ 124 - 43
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_account_management_ctrl.js

@@ -559,18 +559,20 @@ define(['app/app'], function (app) {
             }
           }
           //输入原密码后验证原密码是否正确
+          $scope.checkSuccess = false;
+          $scope.checkFailed = false;
           $scope.checkPassword = function (password) {
-            $scope.checking = true;
             $scope.checkSuccess = false;
             $scope.checkFailed = false;
-            //判断点击的是否在小键盘区域
+            if(!password){
+              $scope.checkFailed = true;
+              $scope.checkSuccess = 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;
             });
           };
@@ -637,6 +639,17 @@ define(['app/app'], function (app) {
 
           //修改密码
           $scope.ok = function () {
+            //原密码校验
+            if(!$scope.checkSuccess){
+              $scope.checkPassword($scope.user.password);
+            }
+            //新密码校验
+            $scope.checkNewPassword($scope.user.newPassword);
+            //再次输入密码校验
+            $scope.checkNewPassword1();
+            if(!$scope.checkSuccess || !$scope.checkSuccess1 || !$scope.checkSuccess2){
+              return;
+            }
             if ($scope.user.newPassword == $scope.user.password) {
               toaster.pop('error', '错误', '新密码与原密码相同');
               return;
@@ -663,10 +676,11 @@ define(['app/app'], function (app) {
                 $scope.checkSuccess2 = false;
                 $scope.checkFailed2 = false;
                 window.location.href = "vendor#/account/management/sec";
+                window.location.reload();
                 $modalInstance.close();
               }, function (response) {
                 toaster.pop('error', '错误', response.data);
-                // $modalInstance.close();
+                $modalInstance.close();
               });
             } else {
               toaster.pop('error', '错误', '重复密码不一致');
@@ -706,6 +720,10 @@ define(['app/app'], function (app) {
               $scope.checkSuccess = false;
             });
           };
+          //如果之前未绑定
+          if($scope.userInfo.userEmail==null?true:false){
+            $scope.checkSuccess = true;
+          }
 
           //验证用户新输入的邮箱是否可用
           $scope.checkSuccess1 = false;
@@ -773,7 +791,9 @@ define(['app/app'], function (app) {
           //校验验证码
           $scope.validCheckCode = function (checkCode) {
             if(!checkCode){
-              return;
+              $scope.checkSuccess2 = false;
+              $scope.checkFailed2 = true;
+              return false;
             }
             User.validCheckCode({checkCode: checkCode,newUserEmail:$scope.user.newUserEmail}, function (data) {
               var status = data.status;
@@ -790,15 +810,31 @@ define(['app/app'], function (app) {
 
           //修改邮箱地址
           $scope.ok = function () {
-            if ($scope.user.newUserEmail == $scope.user.userEmail) {
-              toaster.pop('error', '错误', '新邮箱地址与旧邮箱地址相同');
+            //原邮箱校验
+            if($scope.userInfo.userEmail && !$scope.checkSuccess ){
+              $scope.checkUserEmail($scope.user.userEmail);
+            }
+            //新邮箱校验
+            if(!$scope.checkSuccess1){
+              $scope.emailEnable($scope.user.newUserEmail);
+            }
+            //验证码
+            $scope.validCheckCode($scope.checkCode);
+            if((!$scope.checkSuccess && $scope.userInfo.userEmail)|| !$scope.checkSuccess1 || !$scope.checkSuccess2){
               return;
             }
-            User.updateUserEmail({
-              userEmail: $scope.user.userEmail,
+            var param = {
               newUserEmail: $scope.user.newUserEmail,
               checkCode:$scope.checkCode
-            }, {}, function () {
+            };
+            if ($scope.user.userEmail!=null && $scope.user.newUserEmail == $scope.user.userEmail) {
+              toaster.pop('error', '错误', '新邮箱地址与旧邮箱地址相同');
+              return;
+            }else{
+              param["userEmail"]=$scope.user.userEmail;
+            }
+
+            User.updateUserEmail(param, {}, function () {
               toaster.pop('success', '成功', '修改邮箱成功。');
               //修改userInfo里面的userEmail
               $scope.userInfo.userEmail =$scope.user.newUserEmail.substr(
@@ -815,6 +851,7 @@ define(['app/app'], function (app) {
               $scope.checkFailed1 = false;
               $scope.sendSuccess = false;
               window.location.href = "vendor#/account/management/sec";
+              window.location.reload();
               $modalInstance.close();
             }, function (response) {
               toaster.pop('error', '错误', response.data);
@@ -920,6 +957,8 @@ define(['app/app'], function (app) {
           //校验验证码
           $scope.validTelCheckCode = function (telCheckCode) {
             if(!telCheckCode){
+              $scope.checkSuccess2 = false;
+              $scope.checkFailed2 = true;
               return;
             }
             User.validTelCheckCode({telCheckCode: telCheckCode,newUserTel:$scope.user.newUserTel},
@@ -938,6 +977,19 @@ define(['app/app'], function (app) {
 
           //修改手机
           $scope.ok = function () {
+            //原手机校验
+            if(!$scope.checkSuccess){
+              $scope.checkUserTel($scope.user.userTel);
+            }
+            //新手机校验
+            if(!$scope.checkSuccess1){
+              $scope.telEnable($scope.user.newUserTel);
+            }
+            //验证码校验
+            $scope.validTelCheckCode($scope.checkCode);
+            if(!$scope.checkSuccess || !$scope.checkSuccess1 || !$scope.checkSuccess2){
+              return;
+            }
             if ($scope.user.newUserTel == $scope.user.userTel) {
               toaster.pop('error', '错误', '新手机号与旧手机号相同');
               return;
@@ -962,6 +1014,7 @@ define(['app/app'], function (app) {
               $scope.codeSuccess = false;
               $scope.validSuccess = false;
               window.location.href = "vendor#/account/management/sec";
+              window.location.reload();
               $modalInstance.close();
             }, function (response) {
               toaster.pop('error', '错误', response.data);
@@ -1059,8 +1112,9 @@ define(['app/app'], function (app) {
             }
           }
           //验证是否设置密码
+          $scope.isNewSuccess = false;
+          $scope.isNewFailed = false;
           $scope.checkHaveUserPay = function () {
-            $scope.userPayHidden = false;
             $scope.isNewSuccess = false;
             $scope.isNewFailed = true;
             User.checkHaveUserPay(function (data) {
@@ -1072,27 +1126,28 @@ define(['app/app'], function (app) {
                 $scope.newUserPayLabel = "密码";
                 $scope.isNewSuccess = true;
                 $scope.isNewFailed = false;
-                $scope.checking = false;
               }
             });
           }
 
           //校验原密码是否正确
+          $scope.checkFailed = false;
+          $scope.checkSuccess = false;
           $scope.checkUserPay = function (userPay) {
             if (userPay == null) {
               $scope.checkFailed = true;
               $scope.checkSuccess = false;
               return;
             }
-              $scope.checkSuccess = false;
+            $scope.checkSuccess = false;
+            $scope.checkFailed = false;
+            User.checkUserPay({userPay: userPay}, function () {
               $scope.checkFailed = false;
-              User.checkUserPay({userPay: userPay}, function () {
-                $scope.checkFailed = false;
-                $scope.checkSuccess = true;
-              }, function () {
-                $scope.checkFailed = true;
-                $scope.checkSuccess = false;
-              });
+              $scope.checkSuccess = true;
+            }, function () {
+              $scope.checkFailed = true;
+              $scope.checkSuccess = false;
+            });
           }
 
           //输入新密码,进行校验
@@ -1104,24 +1159,24 @@ define(['app/app'], function (app) {
               $scope.checkSuccess1 = false;
               return;
             }
-              //如果两者相同 则返回
-              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;
+            //如果两者相同 则返回
+            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;
+          }
 
 
           //校验确认密码是否与新密码相同
@@ -1147,6 +1202,17 @@ define(['app/app'], function (app) {
 
           //支付密码
           $scope.ok = function () {
+            //原密码校验
+            if(!$scope.checkSuccess && $scope.userInfo.havePayPwd){
+              $scope.checkUserPay($scope.user.userPay);
+            }
+            //新密码校验
+            $scope.checkNewUserPay($scope.user.newUserPay);
+            //密码确认
+            $scope.checkNewUserPay1();
+            if((!$scope.checkSuccess && $scope.userInfo.havePayPwd) || !$scope.checkSuccess1 || !$scope.checkSuccess2){
+              return;
+            }
             if ($scope.checking && ($scope.user.newUserPay
                     == $scope.user.userPay)) {
               toaster.pop('error', '错误', '新密码与旧密码相同');
@@ -1167,6 +1233,7 @@ define(['app/app'], function (app) {
               $scope.checkFailed2 = false;
               $scope.checking = true;
               window.location.href = "vendor#/account/management/sec";
+              window.location.reload();
               $modalInstance.close();
             }, function (response) {
               toaster.pop('error', '错误', response.data);
@@ -1307,6 +1374,7 @@ define(['app/app'], function (app) {
               $scope.checkFailed3_1 = false;
               $scope.checkFailed1_1 = false;
               window.location.href = "vendor#/account/management/sec";
+              window.location.reload();
               $modalInstance.close();
             }, function (response) {
               toaster.pop('error', '错误', response.data);
@@ -1327,16 +1395,16 @@ define(['app/app'], function (app) {
           $scope.checkSuccess = false;
           $scope.checkFailed = false;
           $scope.checkUserName = function (userName) {
-            if (userName == null) {
+            if (!userName) {
               //toaster.pop('error', '请输入您的真实姓名');
               $scope.checkSuccess = false;
               $scope.checkFailed = true;
-              return;
+              return false;
             } else if (userName.length > 20) {
               //toaster.pop('error', '请勿超过20个字符');
               $scope.checkSuccess = false;
               $scope.checkFailed_1 = true;
-              return;
+              return false;
             } else {
               $scope.checkSuccess = true;
               $scope.checkFailed = false;
@@ -1354,13 +1422,13 @@ define(['app/app'], function (app) {
               $scope.checkSuccess1 = false;
               $scope.checkFailed1 = true;
               $scope.checkFailed1_1 = false;
-              return;
+              return false;
             } else if (userIdcode.length != 18) {
               //toaster.pop('error', '请输入18位的身份证号');
               $scope.checkSuccess1 = false;
               $scope.checkFailed1 = false;
               $scope.checkFailed1_1 = true;
-              return;
+              return false;
             } else {
               $scope.checkSuccess1 = true;
               $scope.checkFailed1 = false;
@@ -1398,6 +1466,18 @@ define(['app/app'], function (app) {
           };
           //保存
           $scope.ok = function () {
+            //姓名
+            $scope.checkUserName($scope.user.userName);
+            //身份证
+            $scope.checkUserIdcode($scope.user.userIdcode);
+            //身份证
+            if(!$scope.checkSuccess2){
+              toaster.pop('error', '错误', '请上传您的证件...');
+              return;
+            }
+            if(!$scope.checkSuccess || !$scope.checkSuccess1 || !$scope.checkSuccess2){
+              return;
+            }
             User.updateRealAuth({userName:$scope.user.userName,userIdcode:$scope.user.userIdcode,idImgUrl:$scope.user.idImgUrl},{},function(){
               toaster.pop('success', '成功', '身份信息提交成功。');
               $modalInstance.close();
@@ -1407,6 +1487,7 @@ define(['app/app'], function (app) {
               $scope.checkSuccess = false;
               $scope.checkFailed = false;
               window.location.href = "vendor#/account/management/sec";
+              window.location.reload();
               $modalInstance.close();
             }, function(response){
               toaster.pop('error', '错误', response.data);

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

@@ -126,7 +126,7 @@
 			<div class="row line" ng-class="{'has-success': checkSuccess, 'has-error': checkFailed}">
 				<label class="col-md-3 col-sm-3 col text-right">原密码:</label>
 				<div class="col-md-8 col-sm-8 col">
-					<input ng-model="user.password" name="password" class="form-control input-sm" type="password" ng-blur="checkPassword(user.password)" required placeholder="当前密码">
+					<input ng-model="user.password" name="password" class="form-control input-sm" type="password" ng-blur="checkPassword(user.password)" placeholder="当前密码">
 					<img src="static/img/user/images/keyboard.png" alt="" ng-click="reloadKeyboard('showPassword', $event);">
 					<div ng-show="showPassword" class="softkeys softkeys1" data-target="input[name='password']"></div>
 				</div>
@@ -139,7 +139,7 @@
 			<div class="row new-password" ng-class="{'has-success': checkSuccess1, 'has-error': checkFailed1}">
 				<label class="col-md-3 col-sm-3 col text-right">新密码:</label>
 				<div class="col-md-8 col-sm-8 col">
-					<input ng-model="user.newPassword" name="newPassword" ng-blur="checkNewPassword(user.newPassword)" class="form-control input-sm" type="password" required  placeholder="8~20位字母、数字、符号">
+					<input ng-model="user.newPassword" name="newPassword" ng-blur="checkNewPassword(user.newPassword)" class="form-control input-sm" type="password" placeholder="8~20位字母、数字、符号">
 					<!-- <div>密码复杂度</div> -->
 					<img src="static/img/user/images/keyboard.png" ng-click="reloadKeyboard('showNewPassword', $event);" alt="">
 					<div ng-show="showNewPassword" style="top: 40px;" class="softkeys softkeys2" data-target="input[name='newPassword']"></div>
@@ -161,7 +161,7 @@
 			<div class="row line" ng-class="{'has-success': checkSuccess2, 'has-error': checkFailed2}">
 				<label ng-model="user.newPassword1" class="col-md-3 col-sm-3 col text-right">重复新密码:</label>
 				<div class="col-md-8 col-sm-8 col">
-					<input ng-model="user.newPassword1" name="password1" ng-blur="checkNewPassword1(user.newPassword1)" class="form-control input-sm" type="password" required placeholder="重复新密码">
+					<input ng-model="user.newPassword1" name="password1" ng-blur="checkNewPassword1(user.newPassword1)" class="form-control input-sm" type="password" placeholder="重复新密码">
 					<img src="static/img/user/images/keyboard.png" ng-click="reloadKeyboard('showPassword1', $event)"  alt="">
 					<div ng-show="showPassword1" class="softkeys softkeys3" data-target="input[name='password1']"></div>
 				</div>
@@ -175,7 +175,7 @@
 		</div>
 		<div class="modal-footer">
 			<button ng-click="cancel()" type="button">取消</button>
-			<button ng-disabled="!checkSuccess || !checkSuccess1 || !checkSuccess2" type="submit">确定</button>
+			<button type="submit">确定</button>
 		</div>
 	</form>
 </div>

+ 3 - 3
src/main/webapp/resources/view/vendor/modal/updateRealAuth.html

@@ -149,7 +149,7 @@
         <div class="row line oldUserPay">
             <label class="col-md-3 col-sm-3 col text-right">真实姓名:</label>
             <div class="col-md-8 col-sm-8 col"><input ng-model="user.userName" class="form-control input-sm"
-                                                       name="uesrName" ng-blur="checkUserName(user.userName)" required
+                                                       name="uesrName" ng-blur="checkUserName(user.userName)"
                                                       ></div>
             <div class="col">
                 <img ng-show="checkSuccess" src="static/img/user/images/input-check-yes.png" alt="">
@@ -163,7 +163,7 @@
             <label class="col-md-3 col-sm-3 col text-right">身份证号:</label>
             <div class="col-md-8 col-sm-8 col">
                 <input ng-model="user.userIdcode" maxlength="18"
-                       class="form-control input-sm" name="userIdcode" ng-blur="checkUserIdcode(user.userIdcode)" required>
+                       class="form-control input-sm" name="userIdcode" ng-blur="checkUserIdcode(user.userIdcode)">
                 <!-- <div>密码复杂度</div> -->
             </div>
             <div class="col">
@@ -195,6 +195,6 @@
     </div>
     <div class="modal-footer">
         <button ng-click="cancel()" type="button">取消</button>
-        <button ng-disabled="!checkSuccess || !checkSuccess1 || !checkSuccess2" type="submit">确定</button>
+        <button type="submit">确定</button>
     </div>
 </form>

+ 3 - 3
src/main/webapp/resources/view/vendor/modal/updateUserEmail.html

@@ -111,7 +111,7 @@
             <label class="col-md-3 col-sm-3 col text-right" ng-show="userInfo.userEmail==null?true:false">邮箱地址:</label>
             <div class="col-md-8 col-sm-8 col">
                 <input ng-model="user.newUserEmail"
-                       class="form-control input-sm" type="newUserEmail" required ng-blur="emailEnable(user.newUserEmail)" placeholder="新邮箱地址">
+                       class="form-control input-sm" type="newUserEmail" ng-blur="emailEnable(user.newUserEmail)" placeholder="新邮箱地址">
                 <!-- <div>密码复杂度</div> -->
             </div>
             <div class="col">
@@ -126,7 +126,7 @@
             <label class="col-md-3 col-sm-3 col text-right">验证码:</label>
             <div class="col-md-8 col-sm-8 col">
                 <input ng-model="checkCode"
-                       class="form-control input-sm" placeholder="请输入验证码" type="checkCode" ng-blur="validCheckCode(checkCode)" required>
+                       class="form-control input-sm" placeholder="请输入验证码" type="checkCode" ng-blur="validCheckCode(checkCode)">
                 <input ng-click="sendCheckCode(user.newUserEmail)" ng-disabled="!sendSuccess" ng-init="paracont='获取验证码'" class="code-btn" ng-model="paracont"/>
             </div>
             <div class="col">
@@ -139,6 +139,6 @@
     </div>
     <div class="modal-footer">
         <button ng-click="cancel()" type="button">取消</button>
-        <button ng-disabled="!checkSuccess2 || !checkSuccess || !checkSuccess1" type="submit">确定</button>
+        <button type="submit">确定</button>
     </div>
 </form>

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

@@ -93,7 +93,7 @@
                 <label class="col-md-3 col-sm-3 col text-right">原密码:</label>
                 <div class="col-md-8 col-sm-8 col">
                     <input ng-model="user.userPay"
-                           class="form-control input-sm" type="password" name="userPay" ng-blur="checkUserPay(user.userPay)" required>
+                           class="form-control input-sm" type="password" name="userPay" ng-blur="checkUserPay(user.userPay)">
                     <img src="static/img/user/images/keyboard.png" ng-click="reloadKeyboard('showUserPay', $event)" alt="">
                     <div ng-show="showUserPay" class="softkeys softkeys1" data-target="input[name='userPay']"></div>
                 </div>
@@ -109,7 +109,7 @@
                 <label class="col-md-3 col-sm-3 col text-right" ng-hide="!isNewSuccess">密码:</label>
                 <div class="col-md-8 col-sm-8 col">
                     <input ng-model="user.newUserPay"
-                           class="form-control input-sm" type="password" name="newUserPay" ng-blur="checkNewUserPay(user.newUserPay)" required>
+                           class="form-control input-sm" type="password" name="newUserPay" ng-blur="checkNewUserPay(user.newUserPay)">
                     <img src="static/img/user/images/keyboard.png" ng-click="reloadKeyboard('showNewUserPay', $event)" alt="">
                     <div ng-show="showNewUserPay" class="softkeys softkeys2" data-target="input[name='newUserPay']"></div>
                     <!-- <div>密码复杂度</div> -->
@@ -125,7 +125,7 @@
                 <label class="col-md-3 col-sm-3 col text-right">确认密码:</label>
                 <div class="col-md-8 col-sm-8 col">
                     <input ng-model="user.newUserPay1"
-                           class="form-control input-sm" name="newUserPay1"  type="password" ng-blur="checkNewUserPay1()" required>
+                           class="form-control input-sm" name="newUserPay1"  type="password" ng-blur="checkNewUserPay1()">
                     <img src="static/img/user/images/keyboard.png" ng-click="reloadKeyboard('showNewUserPay1', $event)" alt="">
                     <div ng-show="showNewUserPay1" class="softkeys softkeys3" data-target="input[name='newUserPay1']"></div>
                 </div>
@@ -139,7 +139,7 @@
         </div>
         <div class="modal-footer">
             <button ng-click="cancel()" type="button">取消</button>
-            <button ng-disabled="(!checkSuccess && !checkSuccess1 && !checkSuccess2)" type="submit">确定</button>
+            <button type="submit">确定</button>
         </div>
     </form>
 </div>

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

@@ -98,7 +98,7 @@
         <div class="row line" ng-class="{'has-success': checkSuccess, 'has-error': checkFailed}">
             <label class="col-md-3 col-sm-3 col text-right">原手机号:</label>
             <div class="col-md-8 col-sm-8 col"><input ng-model="user.userTel" class="form-control input-sm"
-                                                      type="userTel"  ng-blur="checkUserTel(user.userTel)" required
+                                                      type="userTel"  ng-blur="checkUserTel(user.userTel)"
                                                       ></div>
             <div class="col">
                 <img ng-show="checkSuccess" src="static/img/user/images/input-check-yes.png" alt="">
@@ -110,7 +110,7 @@
             <label class="col-md-3 col-sm-3 col text-right">新手机号:</label>
             <div class="col-md-8 col-sm-8 col">
                 <input ng-model="user.newUserTel"
-                       class="form-control input-sm" type="newUserTel" required ng-blur="telEnable(user.newUserTel)">
+                       class="form-control input-sm" type="newUserTel" ng-blur="telEnable(user.newUserTel)">
                 <!-- <div>密码复杂度</div> -->
             </div>
             <div class="col">
@@ -125,7 +125,7 @@
             <label class="col-md-3 col-sm-3 col text-right">验证码:</label>
             <span class="col-md-8 col-sm-8 col">
                 <input ng-model="telCheckCode"
-                       class="form-control input-sm" placeholder="请输入验证码"  type="telCheckCode" ng-blur="validTelCheckCode(telCheckCode)" required>
+                       class="form-control input-sm" placeholder="请输入验证码"  type="telCheckCode" ng-blur="validTelCheckCode(telCheckCode)">
                 <input class="code-btn" ng-click="sendTelCheckCode(user.newUserTel)" ng-init="paracont='获取验证码'" ng-disabled="!sendSuccess" ng-model="paracont" />
             </span>
             <div class="col">
@@ -138,6 +138,6 @@
     </div>
     <div class="modal-footer">
         <button ng-click="cancel()" type="button">取消</button>
-        <button ng-disabled="!checkSuccess2 || !checkSuccess || !checkSuccess1" type="submit">确定</button>
+        <button type="submit">确定</button>
     </div>
 </form>