Authored by hf

fixes bug to newsale cart link

... ... @@ -133,7 +133,9 @@ class LoginController extends AbstractAction
$data['data']['session'] = Helpers::syncUserSession($data['data']['uid']);
$data['data']['href'] = $refer;
$this->setSession('_TOKEN', Helpers::makeToken($data['data']['uid']));
$token = Helpers::makeToken($data['data']['uid']);
$this->setCookie('_TOKEN', $token);
$this->setSession('_TOKEN', $token);
} while (false);
$this->echoJson($data);
... ... @@ -189,8 +191,9 @@ class LoginController extends AbstractAction
}
if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) {
$this->setCookie('_TOKEN', Helpers::makeToken($result['data']['uid']));
$this->setSession('_TOKEN', Helpers::makeToken($result['data']['uid']));
$token = Helpers::makeToken($result['data']['uid']);
$this->setCookie('_TOKEN', $token);
$this->setSession('_TOKEN', $token);
$this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
} else {
$this->go($refer);
... ... @@ -220,8 +223,9 @@ class LoginController extends AbstractAction
}
if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) {
$this->setCookie('_TOKEN', Helpers::makeToken($result['data']['uid']));
$this->setSession('_TOKEN', Helpers::makeToken($result['data']['uid']));
$token = Helpers::makeToken($result['data']['uid']);
$this->setCookie('_TOKEN', $token);
$this->setSession('_TOKEN', $token);
$this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
} else {
$this->go($refer);
... ... @@ -251,8 +255,9 @@ class LoginController extends AbstractAction
}
if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) {
$this->setCookie('_TOKEN', Helpers::makeToken($result['data']['uid']));
$this->setSession('_TOKEN', Helpers::makeToken($result['data']['uid']));
$token = Helpers::makeToken($result['data']['uid']);
$this->setCookie('_TOKEN', $token);
$this->setSession('_TOKEN', $token);
$this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
} else {
$this->go($refer);
... ...
... ... @@ -86,7 +86,7 @@ class NewsaleController extends AbstractAction
'headerBanner' => \Product\NewsaleModel::getNewFocus($channel),
'showDownloadApp' => true,
'pageFooter' => true,
'cartUrl' => Helpers::url('/product/newsale/selectHotrank', null),
'cartUrl' => Helpers::url('/cart/index/index'),
);
$this->_view->display('hotrank', $data);
... ...