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
hf
9 years ago
Commit
d730498d06cc79566b4da6300ebf6c4134262c0d
2 parents
c0153fb0
7b7816ea
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
12 deletions
static/js/passport/login/international.js
static/js/passport/login/login.js
static/js/passport/login/international.js
View file @
d730498
...
...
@@ -73,6 +73,8 @@ $loginBtn.on('touchstart', function() {
return
;
}
$loginBtn
.
text
(
'正在登录...'
).
addClass
(
'disable'
);
if
(
api
.
phoneRegx
[
areaCode
].
test
(
pn
)
&&
api
.
pwdValidate
(
pwd
))
{
$
.
ajax
({
type
:
'POST'
,
...
...
@@ -83,7 +85,8 @@ $loginBtn.on('touchstart', function() {
password
:
pwd
},
success
:
function
(
data
)
{
var
res
;
var
res
,
time
;
if
(
data
.
code
===
200
)
{
res
=
data
.
data
;
...
...
@@ -91,19 +94,32 @@ $loginBtn.on('touchstart', function() {
$
.
ajax
({
url
:
res
.
session
,
dataType
:
'jsonp'
dataType
:
'jsonp'
,
success
:
function
()
{
clearTimeout
(
time
);
//Cookie写入成功后,1s后跳转页面
setTimeout
(
function
()
{
location
.
href
=
res
.
href
;
},
1000
);
}
});
//2000ms后跳转页面
setTimeout
(
function
()
{
//3秒后强制跳转
time
=
setTimeout
(
function
()
{
location
.
href
=
res
.
href
;
},
2000
);
},
3000
);
showErrTip
(
'登录成功'
);
}
else
{
showErrTip
(
data
.
message
);
}
},
error
:
function
()
{
showErrTip
(
'网络断开连接啦~'
);
},
complete
:
function
()
{
$loginBtn
.
text
(
'登录'
).
removeClass
(
'disable'
);
}
});
}
else
{
...
...
static/js/passport/login/login.js
View file @
d730498
...
...
@@ -76,6 +76,8 @@ $loginBtn.on('touchstart', function() {
return
;
}
$loginBtn
.
text
(
'正在登录...'
).
addClass
(
'disable'
);
//验证账号(数字或者邮箱)和密码合理性
if
((
/^
[
0-9
]
+$/
.
test
(
acc
)
||
api
.
emailRegx
.
test
(
acc
))
&&
api
.
pwdValidate
(
pwd
))
{
$
.
ajax
({
...
...
@@ -86,28 +88,40 @@ $loginBtn.on('touchstart', function() {
password
:
pwd
},
success
:
function
(
data
)
{
var
res
;
var
res
,
time
;
if
(
data
.
code
===
200
)
{
res
=
data
.
data
;
showErrTip
(
'登录成功'
);
$
.
ajax
({
url
:
res
.
session
,
dataType
:
'jsonp'
dataType
:
'jsonp'
,
success
:
function
()
{
clearTimeout
(
time
);
//Cookie写入成功后,1s后跳转页面
setTimeout
(
function
()
{
location
.
href
=
res
.
href
;
},
1000
);
}
});
//2s后跳转页面
setTimeout
(
function
()
{
//3秒后强制跳转
time
=
setTimeout
(
function
()
{
location
.
href
=
res
.
href
;
},
2000
);
},
3000
);
showErrTip
(
'登录成功'
);
}
else
{
showErrTip
(
data
.
message
);
}
},
error
:
function
()
{
showErrTip
(
'网络断开连接啦~'
);
},
complete
:
function
()
{
$loginBtn
.
text
(
'登录'
).
removeClass
(
'disable'
);
}
});
}
else
{
...
...
Please
register
or
login
to post a comment