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
hf
9 years ago
Commit
36a70f73f4dc8b77a7fbc835a4d300f486af2d58
1 parent
c2ef23f3
code review by hf: modify call api to release env
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php
View file @
36a70f7
...
...
@@ -26,6 +26,9 @@ class LoginController extends AbstractAction
$this
->
setCookie
(
'refer'
,
$refer
);
}
// 设置登录有效时间30分钟, 防机器刷
$this
->
setSession
(
'_LOGIN_EXPIRE'
,
time
()
+
1800
);
$this
->
setTitle
(
'登录'
);
$data
=
array
(
...
...
@@ -44,9 +47,6 @@ class LoginController extends AbstractAction
// 渲染模板
$this
->
_view
->
display
(
'index'
,
$data
);
// 设置登录有效时间30分钟, 防机器刷
$this
->
setSession
(
'_LOGIN_EXPIRE'
,
time
()
+
1800
);
}
/**
...
...
@@ -59,6 +59,9 @@ class LoginController extends AbstractAction
$this
->
setCookie
(
'refer'
,
$refer
);
}
// 设置登录有效时间30分钟, 防机器刷
$this
->
setSession
(
'_LOGIN_EXPIRE'
,
time
()
+
1800
);
$this
->
setTitle
(
'国际账号登录'
);
$data
=
array
();
...
...
@@ -70,9 +73,6 @@ class LoginController extends AbstractAction
$data
[
'countrys'
]
=
RegData
::
getAreasData
();
// 地区信息列表
// 渲染模板
$this
->
_view
->
display
(
'international'
,
$data
);
// 设置登录有效时间30分钟, 防机器刷
$this
->
setSession
(
'_LOGIN_EXPIRE'
,
time
()
+
1800
);
}
/**
...
...
@@ -129,13 +129,13 @@ class LoginController extends AbstractAction
if
(
!
$verifyEmail
&&
!
$verifyMobile
)
{
break
;
}
/* 设置登录有效时间30分钟, 防机器刷 */
$expire
=
$this
->
getSession
(
'_LOGIN_EXPIRE'
);
if
(
empty
(
$expire
)
||
$expire
<
time
())
{
break
;
}
/* 调用登录接口进行登录 */
// 获取未登录时的唯一识别码
$shoppingKey
=
Helpers
::
getShoppingKeyByCookie
();
...
...
@@ -157,7 +157,6 @@ class LoginController extends AbstractAction
$this
->
setCookie
(
'_TOKEN'
,
$token
);
$this
->
setSession
(
'_TOKEN'
,
$token
);
$this
->
setSession
(
'_LOGIN_UID'
,
$data
[
'data'
][
'uid'
]);
}
while
(
false
);
$this
->
echoJson
(
$data
);
...
...
Please
register
or
login
to post a comment