|
|
@@ -586,7 +586,7 @@ define(['app/app'], function (app) {
|
|
|
//toaster.pop('error', '错误', '密码为8-20字符的英文、数字混合');
|
|
|
$scope.checkSuccess1 = false;
|
|
|
$scope.checkFailed1 = true;
|
|
|
- return;
|
|
|
+ return false;
|
|
|
} else {
|
|
|
$scope.checkSuccess1 = true;
|
|
|
$scope.checkFailed1 = false;
|
|
|
@@ -603,23 +603,23 @@ define(['app/app'], function (app) {
|
|
|
$scope.checkFailed1 = false;
|
|
|
if (newPassword == null) {
|
|
|
$scope.secLevel = 0;
|
|
|
- return;
|
|
|
+ return false;
|
|
|
}
|
|
|
//不足8位,或仅有数字,或仅有英文
|
|
|
if (newPassword.length < 8 || /^[0-9]*$/.test(newPassword)
|
|
|
|| /^[A-Za-z]*$/.test(newPassword)) {
|
|
|
$scope.secLevel = 1;
|
|
|
- return;
|
|
|
+ return false;
|
|
|
}
|
|
|
if (/^[A-Z0-9]{8,20}$/.test(newPassword) || /^[a-z0-9]{8,20}$/.test(
|
|
|
newPassword)) {//达到8位,且 仅有数字+英文小写 或 仅有数字+英文大写
|
|
|
$scope.secLevel = 2;
|
|
|
- return;
|
|
|
+ return false;
|
|
|
}
|
|
|
if (/^(?=.*[0-9].*)(?=.*[A-Z].*)(?=.*[a-z].*).{8,20}$/.test(
|
|
|
newPassword)) {
|
|
|
$scope.secLevel = 3;
|
|
|
- return;
|
|
|
+ return false;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -631,7 +631,7 @@ define(['app/app'], function (app) {
|
|
|
== $scope.user.newPassword1)) {
|
|
|
$scope.checkSuccess2 = true;
|
|
|
$scope.checkFailed2 = false;
|
|
|
- return;
|
|
|
+ return false;
|
|
|
}
|
|
|
$scope.checkSuccess2 = false;
|
|
|
$scope.checkFailed2 = true;
|
|
|
@@ -698,8 +698,8 @@ define(['app/app'], function (app) {
|
|
|
|
|
|
// 修改邮箱Controller
|
|
|
app.register.controller('UserEmailCtrl',
|
|
|
- ['$scope', '$modalInstance', 'user', 'User', 'toaster', '$interval','$location',
|
|
|
- function ($scope, $modalInstance, user, User, toaster, $interval,$location) {
|
|
|
+ ['$scope', '$modalInstance', 'user', 'User', 'toaster', '$interval',
|
|
|
+ function ($scope, $modalInstance, user, User, toaster, $interval) {
|
|
|
$scope.user = user;
|
|
|
$scope.user.userEmail = null;
|
|
|
$scope.user.newUserEmail = null;
|
|
|
@@ -708,7 +708,7 @@ define(['app/app'], function (app) {
|
|
|
if (userEmail == null) {
|
|
|
$scope.checkFailed = true;
|
|
|
$scope.checkSuccess = false;
|
|
|
- return;
|
|
|
+ return false;
|
|
|
}
|
|
|
$scope.checkSuccess = false;
|
|
|
$scope.checkFailed = false;
|
|
|
@@ -738,7 +738,7 @@ define(['app/app'], function (app) {
|
|
|
$scope.checkFailed1 = true;
|
|
|
$scope.sendSuccess = false;
|
|
|
$scope.checkFailed1_1 = false;
|
|
|
- return;
|
|
|
+ return false;
|
|
|
}
|
|
|
User.emailEnable({email: newUserEmail}, function (data) {
|
|
|
if (data.data == "true") {//邮箱可用
|
|
|
@@ -900,7 +900,7 @@ define(['app/app'], function (app) {
|
|
|
$scope.checkSuccess1 = false;
|
|
|
$scope.sendSuccess = false;
|
|
|
$scope.checkFailed1_1 = false;
|
|
|
- return;
|
|
|
+ return false;
|
|
|
}
|
|
|
$scope.checking1 = true;
|
|
|
$scope.checkSuccess1 = false;
|
|
|
@@ -959,7 +959,7 @@ define(['app/app'], function (app) {
|
|
|
if(!telCheckCode){
|
|
|
$scope.checkSuccess2 = false;
|
|
|
$scope.checkFailed2 = true;
|
|
|
- return;
|
|
|
+ return false;
|
|
|
}
|
|
|
User.validTelCheckCode({telCheckCode: telCheckCode,newUserTel:$scope.user.newUserTel},
|
|
|
function (data) {
|
|
|
@@ -986,7 +986,7 @@ define(['app/app'], function (app) {
|
|
|
$scope.telEnable($scope.user.newUserTel);
|
|
|
}
|
|
|
//验证码校验
|
|
|
- $scope.validTelCheckCode($scope.checkCode);
|
|
|
+ $scope.validTelCheckCode($scope.telCheckCode);
|
|
|
if(!$scope.checkSuccess || !$scope.checkSuccess1 || !$scope.checkSuccess2){
|
|
|
return;
|
|
|
}
|
|
|
@@ -1137,7 +1137,7 @@ define(['app/app'], function (app) {
|
|
|
if (userPay == null) {
|
|
|
$scope.checkFailed = true;
|
|
|
$scope.checkSuccess = false;
|
|
|
- return;
|
|
|
+ return false;
|
|
|
}
|
|
|
$scope.checkSuccess = false;
|
|
|
$scope.checkFailed = false;
|
|
|
@@ -1157,7 +1157,7 @@ define(['app/app'], function (app) {
|
|
|
if (newUserPay == null) {
|
|
|
$scope.checkFailed1 = true;
|
|
|
$scope.checkSuccess1 = false;
|
|
|
- return;
|
|
|
+ return false;
|
|
|
}
|
|
|
//如果两者相同 则返回
|
|
|
if ($scope.checking && ($scope.user.userPay
|
|
|
@@ -1165,14 +1165,14 @@ define(['app/app'], function (app) {
|
|
|
toaster.pop('error', '错误', '新密码与原密码相同');
|
|
|
$scope.checkFailed1 = true;
|
|
|
$scope.checkSuccess1 = false;
|
|
|
- return;
|
|
|
+ return false;
|
|
|
}
|
|
|
//正则校验
|
|
|
var reg = /^\d{6}$/;
|
|
|
if (!reg.test(newUserPay)) {
|
|
|
$scope.checkFailed1 = true;
|
|
|
$scope.checkSuccess1 = false;
|
|
|
- return;
|
|
|
+ return false;
|
|
|
}
|
|
|
$scope.checkFailed1 = false;
|
|
|
$scope.checkSuccess1 = true;
|
|
|
@@ -1193,7 +1193,7 @@ define(['app/app'], function (app) {
|
|
|
== $scope.user.newUserPay1)) {
|
|
|
$scope.checkSuccess2 = true;
|
|
|
$scope.checkFailed2 = false;
|
|
|
- return;
|
|
|
+ return false;
|
|
|
}
|
|
|
$scope.checkSuccess2 = false;
|
|
|
$scope.checkFailed2 = true;
|
|
|
@@ -1248,8 +1248,8 @@ define(['app/app'], function (app) {
|
|
|
|
|
|
// 设置密保问题Controller
|
|
|
app.register.controller('UserQuestionCtrl',
|
|
|
- ['$scope', '$modalInstance', 'user', 'User', 'toaster',
|
|
|
- function ($scope, $modalInstance, user, User, toaster) {
|
|
|
+ ['$scope', '$modalInstance', 'user', 'User', 'toaster','$timeout',
|
|
|
+ function ($scope, $modalInstance, user, User, toaster,$timeout) {
|
|
|
//查询所有的密保问题
|
|
|
$scope.pageInfo = {page: 1, count: 20};
|
|
|
User.getAllSecQuestion($scope.pageInfo, function (data) {
|
|
|
@@ -1423,7 +1423,7 @@ define(['app/app'], function (app) {
|
|
|
$scope.checkFailed1 = true;
|
|
|
$scope.checkFailed1_1 = false;
|
|
|
return false;
|
|
|
- } else if (userIdcode.length != 18) {
|
|
|
+ } else if (!(/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(userIdcode))) {
|
|
|
//toaster.pop('error', '请输入18位的身份证号');
|
|
|
$scope.checkSuccess1 = false;
|
|
|
$scope.checkFailed1 = false;
|
|
|
@@ -1487,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){
|