Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
8 changed files
with
24 additions
and
22 deletions
@@ -23,15 +23,17 @@ class Yohobuy | @@ -23,15 +23,17 @@ class Yohobuy | ||
23 | // const SERVICE_URL = 'http://service.api.yohobuy.com/'; | 23 | // const SERVICE_URL = 'http://service.api.yohobuy.com/'; |
24 | // const YOHOBUY_URL = 'http://www.yohobuy.com/'; | 24 | // const YOHOBUY_URL = 'http://www.yohobuy.com/'; |
25 | 25 | ||
26 | - const API_URL = 'http://apih5.yoho.cn/'; | ||
27 | - const API_URL2 = 'http://apih5.yoho.cn/'; | ||
28 | - const SERVICE_URL = 'http://serviceh5.yoho.cn/'; | ||
29 | - const YOHOBUY_URL = 'http://www.yohobuy.com/'; | 26 | +// const API_URL = 'http://apih5.yoho.cn/'; |
27 | +// const API_URL2 = 'http://apih5.yoho.cn/'; | ||
28 | +// const SERVICE_URL = 'http://serviceh5.yoho.cn/'; | ||
29 | +// const YOHOBUY_URL = 'http://www.yohobuy.com/'; | ||
30 | +// const API_OLD = 'http://api2.open.yohobuy.com/'; | ||
30 | 31 | ||
31 | /* 测试环境 */ | 32 | /* 测试环境 */ |
32 | - // const API_URL = 'http://testapi.yoho.cn:28078/'; | ||
33 | - // const SERVICE_URL = 'http://testservice.yoho.cn:28077/'; | ||
34 | - // const YOHOBUY_URL = 'http://www.yohobuy.com/'; | 33 | + const API_URL = 'http://testapi.yoho.cn:28078/'; |
34 | + const SERVICE_URL = 'http://testservice.yoho.cn:28077/'; | ||
35 | + const YOHOBUY_URL = 'http://www.yohobuy.com/'; | ||
36 | + const API_OLD = 'http://test2.open.yohobuy.com/'; | ||
35 | 37 | ||
36 | 38 | ||
37 | /** | 39 | /** |
@@ -38,7 +38,7 @@ class HelpData | @@ -38,7 +38,7 @@ class HelpData | ||
38 | $param['code'] = $code; | 38 | $param['code'] = $code; |
39 | $param['return_type'] = 'html'; | 39 | $param['return_type'] = 'html'; |
40 | $param['client_secret'] = Sign::getSign($param); | 40 | $param['client_secret'] = Sign::getSign($param); |
41 | - return Yohobuy::post(Yohobuy::API_URL, $param, true); | 41 | + return Yohobuy::post(Yohobuy::API_OLD, $param, true); |
42 | } | 42 | } |
43 | 43 | ||
44 | 44 |
@@ -129,7 +129,7 @@ class Helpers | @@ -129,7 +129,7 @@ class Helpers | ||
129 | */ | 129 | */ |
130 | public static function getShoppingKeyByCookie() | 130 | public static function getShoppingKeyByCookie() |
131 | { | 131 | { |
132 | - $cookie = isset($_COOKIE['_Spk']) ? $_COOKIE['_Spk'] : ''; | 132 | + $cookie = isset($_COOKIE['_SPK']) ? $_COOKIE['_SPK'] : ''; |
133 | 133 | ||
134 | return $cookie; | 134 | return $cookie; |
135 | } | 135 | } |
@@ -640,16 +640,13 @@ class HomeController extends AbstractAction | @@ -640,16 +640,13 @@ class HomeController extends AbstractAction | ||
640 | * 我的订单页面,获得nav导航条焦点。并且异步请求订单详情列表页(getOrders) | 640 | * 我的订单页面,获得nav导航条焦点。并且异步请求订单详情列表页(getOrders) |
641 | * | 641 | * |
642 | */ | 642 | */ |
643 | - | ||
644 | public function ordersAction() | 643 | public function ordersAction() |
645 | { | 644 | { |
646 | // 审判跳转登录页 | 645 | // 审判跳转登录页 |
647 | $this->auditJumpLogin(); | 646 | $this->auditJumpLogin(); |
648 | 647 | ||
649 | - $backUrl = Helpers::url('/home'); | ||
650 | - | ||
651 | $this->setTitle('我的订单'); | 648 | $this->setTitle('我的订单'); |
652 | - $this->setNavHeader('我的订单', $backUrl); | 649 | + $this->setNavHeader('我的订单', Helpers::url('/home') ); |
653 | 650 | ||
654 | $order = array(); | 651 | $order = array(); |
655 | //获得type值,type:1=>全部,2=>待付款,3=>待发货,4=>待收货,5=>待评论 | 652 | //获得type值,type:1=>全部,2=>待付款,3=>待发货,4=>待收货,5=>待评论 |
@@ -887,7 +884,7 @@ class HomeController extends AbstractAction | @@ -887,7 +884,7 @@ class HomeController extends AbstractAction | ||
887 | $this->setTitle($caption); | 884 | $this->setTitle($caption); |
888 | $this->setNavHeader($caption); | 885 | $this->setNavHeader($caption); |
889 | 886 | ||
890 | - $this->_view->display('helpDetail', array( | 887 | + $this->_view->display('help-detail', array( |
891 | 'iHelp' => Home\HelpModel::serviceDetail($code), | 888 | 'iHelp' => Home\HelpModel::serviceDetail($code), |
892 | )); | 889 | )); |
893 | } | 890 | } |
@@ -289,7 +289,6 @@ class IndexController extends AbstractAction | @@ -289,7 +289,6 @@ class IndexController extends AbstractAction | ||
289 | $this->go(Helpers::url('/cart/index/index')); | 289 | $this->go(Helpers::url('/cart/index/index')); |
290 | } | 290 | } |
291 | 291 | ||
292 | - | ||
293 | $cookieData = $this->getCookie('order-info', null); | 292 | $cookieData = $this->getCookie('order-info', null); |
294 | $uid = $this->getUid(true); | 293 | $uid = $this->getUid(true); |
295 | $data = array( | 294 | $data = array( |
@@ -457,8 +456,8 @@ class IndexController extends AbstractAction | @@ -457,8 +456,8 @@ class IndexController extends AbstractAction | ||
457 | $result = CartModel::addToCart($productSku, $buyNumber, $goodsType, $isEdit, $promotionId, $uid, $shoppingKey); | 456 | $result = CartModel::addToCart($productSku, $buyNumber, $goodsType, $isEdit, $promotionId, $uid, $shoppingKey); |
458 | 457 | ||
459 | // 设置加入购物车凭证到客户端浏览器 | 458 | // 设置加入购物车凭证到客户端浏览器 |
460 | - if (!$shoppingKey && isset($result['data']['shopping_key'])) { | ||
461 | - $this->setCookie('_Spk', $result['data']['shopping_key']); | 459 | + if (empty($shoppingKey) && isset($result['data']['shopping_key'])) { |
460 | + $this->setCookie('_SPK', $result['data']['shopping_key'], time() + 86400 * 360); | ||
462 | } | 461 | } |
463 | } | 462 | } |
464 | 463 |
@@ -17,6 +17,10 @@ class LoginController extends AbstractAction | @@ -17,6 +17,10 @@ class LoginController extends AbstractAction | ||
17 | */ | 17 | */ |
18 | public function indexAction() | 18 | public function indexAction() |
19 | { | 19 | { |
20 | + // 清除客户端 | ||
21 | + $this->setCookie('_UID', ''); | ||
22 | + $this->setCookie('_TOKEN', ''); | ||
23 | + | ||
20 | $refer = $this->get('refer'); | 24 | $refer = $this->get('refer'); |
21 | if (!empty($refer)) { | 25 | if (!empty($refer)) { |
22 | $this->setCookie('refer', $refer); | 26 | $this->setCookie('refer', $refer); |
@@ -61,7 +65,6 @@ class LoginController extends AbstractAction | @@ -61,7 +65,6 @@ class LoginController extends AbstractAction | ||
61 | $data['isPassportPage'] = true; // 模板中模块标识 | 65 | $data['isPassportPage'] = true; // 模板中模块标识 |
62 | $data['areaCode'] = '+86'; // 默认区号 | 66 | $data['areaCode'] = '+86'; // 默认区号 |
63 | $data['countrys'] = RegData::getAreasData(); // 地区信息列表 | 67 | $data['countrys'] = RegData::getAreasData(); // 地区信息列表 |
64 | - | ||
65 | // 渲染模板 | 68 | // 渲染模板 |
66 | $this->_view->display('international', $data); | 69 | $this->_view->display('international', $data); |
67 | } | 70 | } |
@@ -74,6 +77,7 @@ class LoginController extends AbstractAction | @@ -74,6 +77,7 @@ class LoginController extends AbstractAction | ||
74 | // 清除客户端 | 77 | // 清除客户端 |
75 | $this->setCookie('_UID', ''); | 78 | $this->setCookie('_UID', ''); |
76 | $this->setCookie('_TOKEN', ''); | 79 | $this->setCookie('_TOKEN', ''); |
80 | + $this->setCookie('_SPK', ''); | ||
77 | // 清除服务端会话 | 81 | // 清除服务端会话 |
78 | $this->setSession('_TOKEN', ''); | 82 | $this->setSession('_TOKEN', ''); |
79 | 83 | ||
@@ -148,7 +152,7 @@ class LoginController extends AbstractAction | @@ -148,7 +152,7 @@ class LoginController extends AbstractAction | ||
148 | public function alipayAction() | 152 | public function alipayAction() |
149 | { | 153 | { |
150 | $this->setSession('_TOKEN', ''); | 154 | $this->setSession('_TOKEN', ''); |
151 | - | 155 | + |
152 | Factory::create('alipay')->getAuthorizeUrl(); | 156 | Factory::create('alipay')->getAuthorizeUrl(); |
153 | 157 | ||
154 | exit(); | 158 | exit(); |
@@ -160,7 +164,7 @@ class LoginController extends AbstractAction | @@ -160,7 +164,7 @@ class LoginController extends AbstractAction | ||
160 | public function qqAction() | 164 | public function qqAction() |
161 | { | 165 | { |
162 | $this->setSession('_TOKEN', ''); | 166 | $this->setSession('_TOKEN', ''); |
163 | - | 167 | + |
164 | Factory::create('qqconnect')->getAuthorizeUrl(); | 168 | Factory::create('qqconnect')->getAuthorizeUrl(); |
165 | 169 | ||
166 | exit(); | 170 | exit(); |
@@ -172,7 +176,7 @@ class LoginController extends AbstractAction | @@ -172,7 +176,7 @@ class LoginController extends AbstractAction | ||
172 | public function sinaAction() | 176 | public function sinaAction() |
173 | { | 177 | { |
174 | $this->setSession('_TOKEN', ''); | 178 | $this->setSession('_TOKEN', ''); |
175 | - | 179 | + |
176 | $this->go(Factory::create('sinaweibo')->getAuthorizeUrl()); | 180 | $this->go(Factory::create('sinaweibo')->getAuthorizeUrl()); |
177 | } | 181 | } |
178 | 182 |
-
Please register or login to post a comment