...
|
...
|
@@ -18,12 +18,6 @@ class LoginController extends AbstractAction |
|
|
public function indexAction()
|
|
|
{
|
|
|
$refer = $this->get('refer');
|
|
|
// 已登录则直接跳回
|
|
|
$uid = $this->getUid();
|
|
|
if ($uid) {
|
|
|
$refer = empty($refer) ? SITE_MAIN . '/?go=1' : rawurldecode($refer);
|
|
|
$this->go($refer);
|
|
|
}
|
|
|
if (!empty($refer)) {
|
|
|
$this->setCookie('refer', $refer);
|
|
|
}
|
...
|
...
|
@@ -54,12 +48,6 @@ class LoginController extends AbstractAction |
|
|
public function internationalAction()
|
|
|
{
|
|
|
$refer = $this->get('refer');
|
|
|
// 已登录则直接跳回
|
|
|
$uid = $this->getUid();
|
|
|
if ($uid) {
|
|
|
$refer = empty($refer) ? SITE_MAIN . '/?go=1' : rawurldecode($refer);
|
|
|
$this->go($refer);
|
|
|
}
|
|
|
if (!empty($refer)) {
|
|
|
$this->setCookie('refer', $refer);
|
|
|
}
|
...
|
...
|
@@ -82,10 +70,12 @@ class LoginController extends AbstractAction |
|
|
*/
|
|
|
public function outAction()
|
|
|
{
|
|
|
// 清除客户端
|
|
|
$this->setCookie('_UID', '');
|
|
|
// 清除服务端会话
|
|
|
$this->setSession('_TOKEN', '');
|
|
|
|
|
|
$refer = $this->server('HTTP_REFERER', SITE_MAIN);
|
|
|
|
|
|
$token = $this->get('token');
|
|
|
if (!empty($token)) {
|
|
|
LoginData::signoutSession($token);
|
...
|
...
|
@@ -143,7 +133,6 @@ class LoginController extends AbstractAction |
|
|
$data['data']['href'] = $refer;
|
|
|
|
|
|
$this->setSession('_TOKEN', Helpers::makeToken($data['data']['uid']));
|
|
|
|
|
|
} while (false);
|
|
|
|
|
|
$this->echoJson($data);
|
...
|
...
|
|