|
|
@@ -810,7 +810,7 @@ define(['app/app'], function (app) {
|
|
|
});
|
|
|
};
|
|
|
//如果之前未绑定
|
|
|
- if($scope.userInfo.userEmail==null?true:false){
|
|
|
+ if($scope.userInfo.userEmail==null ? true:false){
|
|
|
$scope.checkSuccess = true;
|
|
|
}
|
|
|
|
|
|
@@ -825,7 +825,6 @@ define(['app/app'], function (app) {
|
|
|
newUserEmail)) {
|
|
|
$scope.checkSuccess1 = false;
|
|
|
$scope.checkFailed1 = true;
|
|
|
- $scope.sendSuccess = false;
|
|
|
$scope.checkFailed1_1 = false;
|
|
|
return false;
|
|
|
}
|
|
|
@@ -833,25 +832,26 @@ define(['app/app'], function (app) {
|
|
|
if (data.data == "true") {//邮箱可用
|
|
|
$scope.checkSuccess1 = true;
|
|
|
$scope.checkFailed1 = false;
|
|
|
- $scope.sendSuccess = true;
|
|
|
$scope.checkFailed1_1 = false;
|
|
|
} else {//邮箱不可用
|
|
|
$scope.checkSuccess1 = false;
|
|
|
$scope.checkFailed1 = false;
|
|
|
- $scope.sendSuccess = false;
|
|
|
$scope.checkFailed1_1 = true;
|
|
|
}
|
|
|
}, function () {
|
|
|
$scope.checkSuccess1 = false;
|
|
|
$scope.checkFailed1 = true;
|
|
|
- $scope.sendSuccess = false;
|
|
|
$scope.checkFailed1_1 = false;
|
|
|
});
|
|
|
};
|
|
|
|
|
|
$scope.codeSuccess = false;
|
|
|
+ $scope.sendSuccess = true;
|
|
|
//发送验证码
|
|
|
$scope.sendCheckCode = function (newUserEmail) {
|
|
|
+ if (!$scope.checkSuccess1 || ($scope.userInfo.userEmail==null && !$scope.checkSuccess)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
$scope.sendSuccess = false;
|
|
|
User.sendCheckCode({newUserEmail: newUserEmail}, function () {
|
|
|
$scope.codeSuccess = true;
|
|
|
@@ -872,6 +872,7 @@ define(['app/app'], function (app) {
|
|
|
}, 1000, 60);
|
|
|
}, function (response) {
|
|
|
toaster.pop('error', '错误', response.data);
|
|
|
+ $scope.sendSuccess = true;
|
|
|
});
|
|
|
};
|
|
|
|
|
|
@@ -938,7 +939,6 @@ define(['app/app'], function (app) {
|
|
|
$scope.validSuccess = false;
|
|
|
$scope.checkSuccess1 = false;
|
|
|
$scope.checkFailed1 = false;
|
|
|
- $scope.sendSuccess = false;
|
|
|
window.location.href = "user#/accountManager/sec";
|
|
|
window.location.reload();
|
|
|
$modalInstance.close();
|
|
|
@@ -983,7 +983,6 @@ define(['app/app'], function (app) {
|
|
|
};
|
|
|
|
|
|
//新手机号是否可用
|
|
|
- $scope.sendSuccess = false;
|
|
|
$scope.checkFailed1 = false;
|
|
|
$scope.checkFailed1_1 = false;
|
|
|
$scope.checkSuccess1 = false;
|
|
|
@@ -991,7 +990,6 @@ define(['app/app'], function (app) {
|
|
|
if (newUserTel == null || !/^[0-9]{8,11}$/.test(newUserTel)) {
|
|
|
$scope.checkFailed1 = true;
|
|
|
$scope.checkSuccess1 = false;
|
|
|
- $scope.sendSuccess = false;
|
|
|
$scope.checkFailed1_1 = false;
|
|
|
return false;
|
|
|
}
|
|
|
@@ -1002,13 +1000,11 @@ define(['app/app'], function (app) {
|
|
|
if (data.data == "true") {//手机可用
|
|
|
$scope.checkSuccess1 = true;
|
|
|
$scope.checkFailed1 = false;
|
|
|
- $scope.sendSuccess = true;
|
|
|
$scope.checkFailed1_1 = false;
|
|
|
} else {//手机不可用
|
|
|
$scope.checkFailed1_1 = true;
|
|
|
$scope.checking1 = false;
|
|
|
$scope.checkSuccess1 = false;
|
|
|
- $scope.sendSuccess = false;
|
|
|
}
|
|
|
}, function () {
|
|
|
$scope.checkFailed1 = true;
|
|
|
@@ -1018,10 +1014,14 @@ define(['app/app'], function (app) {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
- //发送验证码
|
|
|
+ // 发送验证码
|
|
|
$scope.codeSuccess = false;
|
|
|
- //发送验证码
|
|
|
+ $scope.sendSuccess = true;
|
|
|
+ // 发送验证码
|
|
|
$scope.sendTelCheckCode = function (newUserTel) {
|
|
|
+ if (!$scope.checkSuccess1) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
$scope.sendSuccess = false;
|
|
|
User.sendTelCheckCode({newUserTel: newUserTel}, function () {
|
|
|
$scope.codeSuccess = true;
|
|
|
@@ -1042,6 +1042,7 @@ define(['app/app'], function (app) {
|
|
|
}, 1000, 60);
|
|
|
}, function (response) {
|
|
|
toaster.pop('error', '错误', response.data);
|
|
|
+ $scope.sendSuccess = true;
|
|
|
});
|
|
|
};
|
|
|
|