Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
weiguang.xie
9 years ago
Commit
0e95676ed19c3324f681045e778f9b3cb88a4dc1
2 parents
7ab492a7
cf97d1a6
Merge branch 'fix/issue' into 'develop'
修复注册和绑定手机号时,重复请求验证码的bug See merge request !56
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
static/js/passport/bind/bind.js
static/js/passport/register/register.js
static/js/passport/bind/bind.js
View file @
0e95676
...
...
@@ -20,14 +20,14 @@ var api = require('../api'),
var
trim
=
$
.
trim
;
var
showErrTip
=
tip
.
show
;
var
request
ing
=
false
;
var
request
ed
=
false
;
function
nextStep
(
url
,
mobileNo
,
areaCode
)
{
if
(
request
ing
)
{
if
(
request
ed
)
{
return
false
;
}
request
ing
=
true
;
request
ed
=
true
;
$
.
ajax
({
type
:
'POST'
,
...
...
@@ -39,13 +39,10 @@ function nextStep(url, mobileNo, areaCode) {
success
:
function
(
res
)
{
console
.
log
(
res
.
data
);
location
.
href
=
url
;
requesting
=
false
;
},
error
:
function
()
{
tip
.
show
(
'出错了,请重试!'
);
requesting
=
false
;
requested
=
false
;
}
});
}
...
...
static/js/passport/register/register.js
View file @
0e95676
...
...
@@ -16,6 +16,8 @@ var tip = require('../../plugin/tip');
var
trim
=
$
.
trim
;
var
showErrTip
=
tip
.
show
;
var
requested
=
false
;
api
.
selectCssHack
(
$
(
'#country-select'
));
api
.
bindClearEvt
();
...
...
@@ -40,7 +42,15 @@ $btnNext.on('touchstart', function() {
return
;
}
if
(
requested
)
{
return
false
;
}
if
(
api
.
phoneRegx
[
areaCode
].
test
(
pn
))
{
requested
=
true
;
$
.
ajax
({
url
:
'/passport/reg/verifymobile'
,
type
:
'POST'
,
...
...
@@ -53,10 +63,15 @@ $btnNext.on('touchstart', function() {
location
.
href
=
data
.
data
;
}
else
{
showErrTip
(
data
.
message
);
requested
=
false
;
}
},
error
:
function
(
err
)
{
showErrTip
(
'出错了,请重试'
);
requested
=
false
;
}
});
}
else
{
showErrTip
(
'手机号格式不正确,请重新输入'
);
}
});
\ No newline at end of file
});
...
...
Please
register
or
login
to post a comment