Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
shijian
8 years ago
Commit
2b0e66b3e8af30c010f1f798cc53784ecebe2667
1 parent
cf3eee2f
save
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
16 deletions
public/js/passport/reg/reg.js
public/js/passport/reg/reg.js
View file @
2b0e66b
...
...
@@ -162,8 +162,10 @@ function validateImgCaptcha() {
}()).
then
(
function
()
{
hideTip
(
$imgCaptchaInput
);
ep
.
emit
(
'captcha-img'
,
true
);
return
true
;
}).
fail
(
function
()
{
ep
.
emit
(
'captcha-img'
,
false
);
return
false
;
});
}
...
...
@@ -466,8 +468,7 @@ function disableSMSBtn() {
}
exports
.
init
=
function
()
{
$smsCaptchaCtrl
.
removeClass
(
'disable'
);
$smsCaptchaCtrl
.
removeClass
(
'disable'
)
// 验证手机输入
// $phoneNumInput.on('blur', function() {
// validatePhoneNum();
...
...
@@ -479,7 +480,7 @@ exports.init = function() {
// 验证图形输入
$imgCaptchaInput
.
on
(
'blur'
,
function
()
{
validateImgCaptcha
();
//
validateImgCaptcha();
$imgCaptchaInput
.
removeClass
(
'focus'
);
}).
on
(
'focus'
,
function
()
{
hideTip
(
$imgCaptchaInput
);
...
...
@@ -570,19 +571,23 @@ exports.init = function() {
// 点击发送验证码
$smsCaptchaCtrl
.
on
(
'click'
,
function
()
{
if
(
$smsCaptchaCtrl
.
hasClass
(
'disable'
)
||
$smsCaptchaCtrl
.
hasClass
(
'second-progress'
))
{
return
;
}
$smsCaptchaCtrl
.
addClass
(
'disable'
);
disableSMSBtn
();
sendSMSCaptcha
().
then
((
data
)
=>
{
if
(
data
.
code
!==
200
)
{
errTip
(
$imgCaptchaInput
,
data
.
message
);
refreshImgCaptcha
();
}
else
{
hideTip
(
$smsCaptchaInput
);
// if ($smsCaptchaCtrl.hasClass('disable') || $smsCaptchaCtrl.hasClass('second-progress')) {
// return;
// }
validateImgCaptcha
().
then
(
allow
=>
{
if
(
allow
)
{
$smsCaptchaCtrl
.
addClass
(
'disable'
);
disableSMSBtn
();
sendSMSCaptcha
().
then
((
data
)
=>
{
if
(
data
.
code
!==
200
)
{
errTip
(
$imgCaptchaInput
,
data
.
message
);
refreshImgCaptcha
();
}
else
{
hideTip
(
$smsCaptchaInput
);
}
});
}
});
});
...
...
Please
register
or
login
to post a comment