Authored by htoooth

add file

@@ -317,6 +317,7 @@ mobileTipShowOnce.add(function() { @@ -317,6 +317,7 @@ mobileTipShowOnce.add(function() {
317 317
318 refreshSmsImgCallBack.add(function() { 318 refreshSmsImgCallBack.add(function() {
319 $smsCaptchaImgPic.attr('src', CAPTCHA_IMG_URL + $.now()); 319 $smsCaptchaImgPic.attr('src', CAPTCHA_IMG_URL + $.now());
  320 + $smsCaptchaImgInput.val('');
320 }); 321 });
321 322
322 /** ************************************************************************/ 323 /** ************************************************************************/
@@ -867,7 +868,6 @@ function validateWithPasswordMode() { @@ -867,7 +868,6 @@ function validateWithPasswordMode() {
867 // 短信验证过程 868 // 短信验证过程
868 function validateWithSmsMode() { 869 function validateWithSmsMode() {
869 return validateAccount() 870 return validateAccount()
870 - .then(validateSmsCaptchaImg)  
871 .then(validateCaptchaSms); 871 .then(validateCaptchaSms);
872 } 872 }
873 873
@@ -920,31 +920,31 @@ function preSmsLoginWithValidate() { @@ -920,31 +920,31 @@ function preSmsLoginWithValidate() {
920 var defer = $.Deferred(); // eslint-disable-line 920 var defer = $.Deferred(); // eslint-disable-line
921 921
922 if (account === '') { 922 if (account === '') {
923 - showAccountTip1('请输入手机号'); 923 + showAccountTip2('请输入手机号');
924 924
925 - defer.reject(); 925 + return defer.reject().promise();
926 } 926 }
927 927
928 if (smsImg === '') { 928 if (smsImg === '') {
929 showSmsCaptchaImgTip('请输入图形证码'); 929 showSmsCaptchaImgTip('请输入图形证码');
930 930
931 - defer.reject(); 931 + return defer.reject().promise();
932 } 932 }
933 933
934 if (password === '') { 934 if (password === '') {
935 showCaptchaSmsTip('请输入短信验证码'); 935 showCaptchaSmsTip('请输入短信验证码');
936 936
937 - defer.reject(); 937 + return defer.reject().promise();
938 } 938 }
939 939
940 if (password === '' && account === '') { 940 if (password === '' && account === '') {
941 // 账户名和密码都为空的情况下点击登陆,只在账户输入框后显示错误提示 941 // 账户名和密码都为空的情况下点击登陆,只在账户输入框后显示错误提示
942 - showAccountTip1('请输入手机号和短信验证码'); 942 + showAccountTip2('请输入手机号和短信验证码');
943 943
944 $captchaSmsTip.addClass('hide'); 944 $captchaSmsTip.addClass('hide');
945 $captchaSmsInput.addClass('error'); 945 $captchaSmsInput.addClass('error');
946 946
947 - defer.reject(); 947 + return defer.reject().promise();
948 } 948 }
949 949
950 return defer.resolve().promise(); 950 return defer.resolve().promise();
@@ -965,7 +965,7 @@ function loginAsync() { @@ -965,7 +965,7 @@ function loginAsync() {
965 areaCode: getAreaCodeVal(), 965 areaCode: getAreaCodeVal(),
966 account: currentLogin.getAccountVal(), 966 account: currentLogin.getAccountVal(),
967 password: currentLogin.creditableToken(), 967 password: currentLogin.creditableToken(),
968 - captcha: currentLogin.type() === 'password' ? getCaptchaImgVal() : getSmsCaptchaImgVal(), 968 + captcha: currentLogin.type() === 'password' ? getCaptchaImgVal() : '',
969 isRemember: getRememberMeVal(), 969 isRemember: getRememberMeVal(),
970 loginType: currentLogin.type() 970 loginType: currentLogin.type()
971 } 971 }
@@ -1110,9 +1110,9 @@ $captchaSmsBtn.on('click', function() { @@ -1110,9 +1110,9 @@ $captchaSmsBtn.on('click', function() {
1110 validateAccount() 1110 validateAccount()
1111 .then(validateSmsCaptchaImg) 1111 .then(validateSmsCaptchaImg)
1112 .then(function() { 1112 .then(function() {
1113 - disable60sSendSmsBtn();  
1114 - return sendCaptchaSmsAsync();  
1115 - }); 1113 + disable60sSendSmsBtn();
  1114 + return sendCaptchaSmsAsync();
  1115 + });
1116 }); 1116 });
1117 1117
1118 // 记住登录状态 1118 // 记住登录状态