Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
3 changed files
with
51 additions
and
44 deletions
@@ -18,17 +18,17 @@ class Yohobuy | @@ -18,17 +18,17 @@ class Yohobuy | ||
18 | { | 18 | { |
19 | 19 | ||
20 | // /* 正式环境 */ | 20 | // /* 正式环境 */ |
21 | -// const API_URL = 'http://api2.open.yohobuy.com/'; | ||
22 | -// const API_URL2 = 'http://api.open.yohobuy.com/'; | ||
23 | -// const SERVICE_URL = 'http://service.api.yohobuy.com/'; | ||
24 | -// const YOHOBUY_URL = 'http://www.yohobuy.com/'; | 21 | + const API_URL = 'http://api2.open.yohobuy.com/'; |
22 | + const API_URL2 = 'http://api.open.yohobuy.com/'; | ||
23 | + const SERVICE_URL = 'http://service.api.yohobuy.com/'; | ||
24 | + const YOHOBUY_URL = 'http://www.yohobuy.com/'; | ||
25 | 25 | ||
26 | /* 测试环境 */ | 26 | /* 测试环境 */ |
27 | - const API_URL = 'http://test2.open.yohobuy.com/'; | ||
28 | - const SERVICE_URL = 'http://test.service.api.yohobuy.com/'; | ||
29 | - const YOHOBUY_URL = 'http://www.yohobuy.com/'; | ||
30 | - const API_URL_MYCENTER = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的个人中心接口URL | ||
31 | - const API_URL_SHOPINGCART = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的购物车接口URL | 27 | +// const API_URL = 'http://test2.open.yohobuy.com/'; |
28 | +// const SERVICE_URL = 'http://test.service.api.yohobuy.com/'; | ||
29 | +// const YOHOBUY_URL = 'http://www.yohobuy.com/'; | ||
30 | +// const API_URL_MYCENTER = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的个人中心接口URL | ||
31 | +// const API_URL_SHOPINGCART = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的购物车接口URL | ||
32 | 32 | ||
33 | /** | 33 | /** |
34 | * 私钥列表 | 34 | * 私钥列表 |
@@ -444,14 +444,14 @@ class HomeController extends AbstractAction | @@ -444,14 +444,14 @@ class HomeController extends AbstractAction | ||
444 | $data = OrderModel::getNavs($type); | 444 | $data = OrderModel::getNavs($type); |
445 | if (!empty($data)) { | 445 | if (!empty($data)) { |
446 | $order['navs'] = $data; | 446 | $order['navs'] = $data; |
447 | - $order['orderPage'] = true; | ||
448 | } else { | 447 | } else { |
449 | $this->error(); | 448 | $this->error(); |
450 | } | 449 | } |
451 | 450 | ||
452 | $this->_view->display('order', array( | 451 | $this->_view->display('order', array( |
453 | 'order' => $order, | 452 | 'order' => $order, |
454 | - 'pageFooter' => true | 453 | + 'pageFooter' => true, |
454 | + 'orderPage' => true | ||
455 | )); | 455 | )); |
456 | } | 456 | } |
457 | 457 | ||
@@ -476,7 +476,11 @@ class HomeController extends AbstractAction | @@ -476,7 +476,11 @@ class HomeController extends AbstractAction | ||
476 | if (!empty($data)) { | 476 | if (!empty($data)) { |
477 | $order['orders'] = $data; | 477 | $order['orders'] = $data; |
478 | } else { | 478 | } else { |
479 | - $order['walkwayUrl'] = 'http://www.baidu.com'; | 479 | + if ($page > 1) { |
480 | + echo " "; | ||
481 | + } else { | ||
482 | + $order['walkwayUrl'] = 'http://www.baidu.com'; | ||
483 | + } | ||
480 | } | 484 | } |
481 | //渲染模板 | 485 | //渲染模板 |
482 | $this->_view->display('order-content', $order); | 486 | $this->_view->display('order-content', $order); |
@@ -121,55 +121,58 @@ class OrderModel | @@ -121,55 +121,58 @@ class OrderModel | ||
121 | } | 121 | } |
122 | return $arr; | 122 | return $arr; |
123 | } | 123 | } |
124 | - | 124 | + |
125 | //根据type值设置nav属性 | 125 | //根据type值设置nav属性 |
126 | - public function getNavs($type){ | 126 | + public function getNavs($type) { |
127 | $nav = array( | 127 | $nav = array( |
128 | array( | 128 | array( |
129 | 'name' => '全部', | 129 | 'name' => '全部', |
130 | - 'typeId' => '1' | 130 | + 'typeId' => '1', |
131 | + 'url' => '/home/order?type=1' | ||
131 | ), | 132 | ), |
132 | array( | 133 | array( |
133 | 'name' => '待付款', | 134 | 'name' => '待付款', |
134 | - 'typeId' => '2' | 135 | + 'typeId' => '2', |
136 | + 'url' => '/home/order?type=2' | ||
135 | ), | 137 | ), |
136 | array( | 138 | array( |
137 | 'name' => '待发货', | 139 | 'name' => '待发货', |
138 | - 'typeId' => '3' | 140 | + 'typeId' => '3', |
141 | + 'url' => '/home/order?type=3' | ||
139 | ), | 142 | ), |
140 | array( | 143 | array( |
141 | 'name' => '待收货', | 144 | 'name' => '待收货', |
142 | - 'typeId' => '4' | 145 | + 'typeId' => '4', |
146 | + 'url' => '/home/order?type=4' | ||
143 | ) | 147 | ) |
144 | ); | 148 | ); |
145 | - foreach($nav as $key => $vo){ | ||
146 | - switch ($type) { | ||
147 | - case 1: | ||
148 | - if($vo['typeId'] == 1){ | ||
149 | - $nav[$key]['active'] = true; | ||
150 | - } | ||
151 | - break; | ||
152 | - case 2: | ||
153 | - if($vo['typeId'] == 2){ | ||
154 | - $nav[$key]['active'] = true; | ||
155 | - } | ||
156 | - break; | ||
157 | - case 3: | ||
158 | - if($vo['typeId'] == 3){ | ||
159 | - $nav[$key]['active'] = true; | ||
160 | - } | ||
161 | - break; | ||
162 | - case 4: | ||
163 | - if($vo['typeId'] == 4){ | ||
164 | - $nav[$key]['active'] = true; | ||
165 | - } | ||
166 | - break; | ||
167 | - default: | ||
168 | - break; | ||
169 | - } | 149 | + foreach ($nav as $key => $vo) { |
150 | + switch ($type) { | ||
151 | + case 1: | ||
152 | + if ($vo['typeId'] == 1) { | ||
153 | + $nav[$key]['active'] = true; | ||
154 | + } | ||
155 | + break; | ||
156 | + case 2: | ||
157 | + if ($vo['typeId'] == 2) { | ||
158 | + $nav[$key]['active'] = true; | ||
159 | + } | ||
160 | + break; | ||
161 | + case 3: | ||
162 | + if ($vo['typeId'] == 3) { | ||
163 | + $nav[$key]['active'] = true; | ||
164 | + } | ||
165 | + break; | ||
166 | + case 4: | ||
167 | + if ($vo['typeId'] == 4) { | ||
168 | + $nav[$key]['active'] = true; | ||
169 | + } | ||
170 | + break; | ||
171 | + default: | ||
172 | + break; | ||
173 | + } | ||
170 | } | 174 | } |
171 | return $nav; | 175 | return $nav; |
172 | - | ||
173 | } | 176 | } |
174 | 177 | ||
175 | } | 178 | } |
-
Please register or login to post a comment