...
|
...
|
@@ -17,13 +17,19 @@ class LoginController extends AbstractAction |
|
|
*/
|
|
|
public function indexAction()
|
|
|
{
|
|
|
$this->setTitle('登录');
|
|
|
|
|
|
$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);
|
|
|
}
|
|
|
|
|
|
$this->setTitle('登录');
|
|
|
|
|
|
$data = array(
|
|
|
'loginIndex' => true, // 模板中使用JS的标识
|
|
|
'backUrl' => '/', // 返回的URL链接
|
...
|
...
|
@@ -47,13 +53,19 @@ class LoginController extends AbstractAction |
|
|
*/
|
|
|
public function internationalAction()
|
|
|
{
|
|
|
$this->setTitle('国际账号登录');
|
|
|
|
|
|
$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);
|
|
|
}
|
|
|
|
|
|
$this->setTitle('国际账号登录');
|
|
|
|
|
|
$data = array();
|
|
|
$data['loginInternational'] = true; // 模板中使用JS的标识
|
|
|
$data['backUrl'] = '/'; // 返回的URL链接
|
...
|
...
|
@@ -61,6 +73,7 @@ class LoginController extends AbstractAction |
|
|
$data['isPassportPage'] = true; // 模板中模块标识
|
|
|
$data['areaCode'] = '+86'; // 默认区号
|
|
|
$data['countrys'] = RegData::getAreasData(); // 地区信息列表
|
|
|
|
|
|
// 渲染模板
|
|
|
$this->_view->display('international', $data);
|
|
|
}
|
...
|
...
|
@@ -127,7 +140,6 @@ class LoginController extends AbstractAction |
|
|
}
|
|
|
$data['data']['session'] = Helpers::syncUserSession($data['data']['uid']);
|
|
|
$data['data']['href'] = $refer;
|
|
|
|
|
|
} while (false);
|
|
|
|
|
|
$this->echoJson($data);
|
...
|
...
|
|