Authored by hf

fixes bug to newsale cart link

@@ -133,7 +133,9 @@ class LoginController extends AbstractAction @@ -133,7 +133,9 @@ class LoginController extends AbstractAction
133 $data['data']['session'] = Helpers::syncUserSession($data['data']['uid']); 133 $data['data']['session'] = Helpers::syncUserSession($data['data']['uid']);
134 $data['data']['href'] = $refer; 134 $data['data']['href'] = $refer;
135 135
136 - $this->setSession('_TOKEN', Helpers::makeToken($data['data']['uid'])); 136 + $token = Helpers::makeToken($data['data']['uid']);
  137 + $this->setCookie('_TOKEN', $token);
  138 + $this->setSession('_TOKEN', $token);
137 } while (false); 139 } while (false);
138 140
139 $this->echoJson($data); 141 $this->echoJson($data);
@@ -189,8 +191,9 @@ class LoginController extends AbstractAction @@ -189,8 +191,9 @@ class LoginController extends AbstractAction
189 } 191 }
190 192
191 if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) { 193 if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) {
192 - $this->setCookie('_TOKEN', Helpers::makeToken($result['data']['uid']));  
193 - $this->setSession('_TOKEN', Helpers::makeToken($result['data']['uid'])); 194 + $token = Helpers::makeToken($result['data']['uid']);
  195 + $this->setCookie('_TOKEN', $token);
  196 + $this->setSession('_TOKEN', $token);
194 $this->go(Helpers::syncUserSession($result['data']['uid'], $refer)); 197 $this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
195 } else { 198 } else {
196 $this->go($refer); 199 $this->go($refer);
@@ -220,8 +223,9 @@ class LoginController extends AbstractAction @@ -220,8 +223,9 @@ class LoginController extends AbstractAction
220 } 223 }
221 224
222 if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) { 225 if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) {
223 - $this->setCookie('_TOKEN', Helpers::makeToken($result['data']['uid']));  
224 - $this->setSession('_TOKEN', Helpers::makeToken($result['data']['uid'])); 226 + $token = Helpers::makeToken($result['data']['uid']);
  227 + $this->setCookie('_TOKEN', $token);
  228 + $this->setSession('_TOKEN', $token);
225 $this->go(Helpers::syncUserSession($result['data']['uid'], $refer)); 229 $this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
226 } else { 230 } else {
227 $this->go($refer); 231 $this->go($refer);
@@ -251,8 +255,9 @@ class LoginController extends AbstractAction @@ -251,8 +255,9 @@ class LoginController extends AbstractAction
251 } 255 }
252 256
253 if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) { 257 if (isset($result['code']) && $result['code'] == 200 && !empty($result['data']['uid'])) {
254 - $this->setCookie('_TOKEN', Helpers::makeToken($result['data']['uid']));  
255 - $this->setSession('_TOKEN', Helpers::makeToken($result['data']['uid'])); 258 + $token = Helpers::makeToken($result['data']['uid']);
  259 + $this->setCookie('_TOKEN', $token);
  260 + $this->setSession('_TOKEN', $token);
256 $this->go(Helpers::syncUserSession($result['data']['uid'], $refer)); 261 $this->go(Helpers::syncUserSession($result['data']['uid'], $refer));
257 } else { 262 } else {
258 $this->go($refer); 263 $this->go($refer);
@@ -86,7 +86,7 @@ class NewsaleController extends AbstractAction @@ -86,7 +86,7 @@ class NewsaleController extends AbstractAction
86 'headerBanner' => \Product\NewsaleModel::getNewFocus($channel), 86 'headerBanner' => \Product\NewsaleModel::getNewFocus($channel),
87 'showDownloadApp' => true, 87 'showDownloadApp' => true,
88 'pageFooter' => true, 88 'pageFooter' => true,
89 - 'cartUrl' => Helpers::url('/product/newsale/selectHotrank', null), 89 + 'cartUrl' => Helpers::url('/cart/index/index'),
90 ); 90 );
91 91
92 $this->_view->display('hotrank', $data); 92 $this->_view->display('hotrank', $data);