Browse Source

账户管理-获取验证码,校验原邮箱/手机

yangc 8 years ago
parent
commit
4d7a7afb93

+ 10 - 4
src/main/webapp/resources/js/usercenter/controllers/forstore/account_manager_ctrl.js

@@ -849,7 +849,10 @@ define(['app/app'], function (app) {
           $scope.sendSuccess = true;
           //发送验证码
           $scope.sendCheckCode = function (newUserEmail) {
-            if (!$scope.checkSuccess1 || ($scope.userInfo.userEmail==null && !$scope.checkSuccess)) {
+            if (!$scope.checkSuccess1 || ($scope.userInfo.userEmail!=null && !$scope.checkSuccess)) {
+                if ($scope.userInfo.userEmail!=null && !$scope.checkSuccess) {
+                    $scope.checkFailed = true;
+                }
               return;
 						}
             $scope.sendSuccess = false;
@@ -1019,9 +1022,12 @@ define(['app/app'], function (app) {
           $scope.sendSuccess = true;
           // 发送验证码
           $scope.sendTelCheckCode = function (newUserTel) {
-            if (!$scope.checkSuccess1) {
-              return;
-            }
+              if (!$scope.checkSuccess1 || ($scope.userInfo.userTel!=null && !$scope.checkSuccess)) {
+                  if ($scope.userInfo.userTel!=null && !$scope.checkSuccess) {
+                      $scope.checkFailed = true;
+                  }
+                  return;
+              }
             $scope.sendSuccess = false;
             User.sendTelCheckCode({newUserTel: newUserTel}, function () {
               $scope.codeSuccess = true;

+ 9 - 3
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_account_management_ctrl.js

@@ -788,7 +788,10 @@ define(['app/app'], function(app) {
           $scope.sendSuccess = true;
           //发送验证码
           $scope.sendCheckCode = function (newUserEmail) {
-            if (!$scope.checkSuccess1 || ($scope.userInfo.userEmail==null && !$scope.checkSuccess)) {
+            if (!$scope.checkSuccess1 || ($scope.userInfo.userEmail!=null && !$scope.checkSuccess)) {
+                if ($scope.userInfo.userEmail!=null && !$scope.checkSuccess) {
+                    $scope.checkFailed = true;
+                }
               return;
             }
             $scope.sendSuccess = false;
@@ -958,8 +961,11 @@ define(['app/app'], function(app) {
           $scope.sendSuccess = true;
           //发送验证码
           $scope.sendTelCheckCode = function (newUserTel) {
-            if (!$scope.checkSuccess1) {
-              return;
+            if (!$scope.checkSuccess1 || ($scope.userInfo.userTel!=null && !$scope.checkSuccess)) {
+                if ($scope.userInfo.userTel!=null && !$scope.checkSuccess) {
+                    $scope.checkFailed = true;
+                }
+                return;
             }
             $scope.sendSuccess = false;
             User.sendTelCheckCode({newUserTel: newUserTel}, function () {