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
Email Patches
Plain Diff
Browse Files
Authored by
lore-w
9 years ago
Commit
e482eee1cd10c44fdc090090c24de3d93cf6206c
1 parent
28f00c03
注册逻辑修改 code review by liuyue
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
6 deletions
template/www.yohobuy.com/partials/passport/register.phtml
web-static/js/passport/reg.js
web-static/sass/passport/_register.scss
template/www.yohobuy.com/partials/passport/register.phtml
View file @
e482eee
<div class="register-page">
<
form id="register-form" class="register-form" method="POST" action="{{actionUrl}}" autocomplete="off"
>
<
!--<form id="register-form" class="register-form" method="POST" action="{{actionUrl}}" autocomplete="off">--
>
<ul>
<li class="clearfix">
<select id="region" class="region" name="region">
...
...
@@ -64,5 +64,5 @@
<span></span>
<b></b>
</div>
<
/form
>
<
!--</form>--
>
</div>
\ No newline at end of file
...
...
web-static/js/passport/reg.js
View file @
e482eee
...
...
@@ -97,8 +97,8 @@ function phoneAjaxFn(callback) {
validateResult
[
0
].
message
=
''
;
validateResult
[
0
].
status
=
true
;
break
;
case
404
:
validateResult
[
0
].
message
=
'改账号已经存在'
;
case
400
:
validateResult
[
0
].
message
=
data
.
message
;
validateResult
[
0
].
status
=
false
;
break
;
}
...
...
@@ -464,7 +464,48 @@ $registerBtn.click(function() {
if
(
$
(
this
).
hasClass
(
'disable'
))
{
return
;
}
else
{
(
'#register-form'
).
submit
();
//ajax提交
$
.
ajax
({
type
:
'POST'
,
url
:
'/passport/register/mobileregister'
,
data
:
{
area
:
$region
.
text
().
split
(
'+'
)[
1
],
mobile
:
$pn
.
val
(),
captcha
:
$ca
.
val
(),
code
:
$mc
.
val
(),
password
:
$pwd
.
val
()
}
}).
then
(
function
(
data
)
{
var
time
=
0
,
t
,
refer
=
data
.
href
;
t
=
setTimeout
(
function
()
{
time
++
;
},
1000
);
$
.
ajax
({
type
:
'POST'
,
url
:
'/passport/register/mobileregister'
,
data
:
{
session
:
data
.
session
}
}).
then
(
function
(
data
)
{
if
(
data
.
code
===
200
&&
t
<
3
)
{
clearInterval
(
t
);
location
.
href
=
refer
;
}
});
if
(
t
>=
3
)
{
clearInterval
(
t
);
location
.
href
=
refer
;
}
});
}
});
...
...
web-static/sass/passport/_register.scss
View file @
e482eee
...
...
@@ -11,7 +11,7 @@
color
:
#b9b9b9
;
}
.register-
form
{
.register-
page
{
height
:
auto
;
li
{
...
...
Please
register
or
login
to post a comment