Authored by ccbikai

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

@@ -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,8 +476,12 @@ class HomeController extends AbstractAction @@ -476,8 +476,12 @@ 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 + if ($page > 1) {
  480 + echo " ";
  481 + } else {
479 $order['walkwayUrl'] = 'http://www.baidu.com'; 482 $order['walkwayUrl'] = 'http://www.baidu.com';
480 } 483 }
  484 + }
481 //渲染模板 485 //渲染模板
482 $this->_view->display('order-content', $order); 486 $this->_view->display('order-content', $order);
483 } 487 }
@@ -123,44 +123,48 @@ class OrderModel @@ -123,44 +123,48 @@ class OrderModel
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){ 149 + foreach ($nav as $key => $vo) {
146 switch ($type) { 150 switch ($type) {
147 case 1: 151 case 1:
148 - if($vo['typeId'] == 1){ 152 + if ($vo['typeId'] == 1) {
149 $nav[$key]['active'] = true; 153 $nav[$key]['active'] = true;
150 } 154 }
151 break; 155 break;
152 case 2: 156 case 2:
153 - if($vo['typeId'] == 2){ 157 + if ($vo['typeId'] == 2) {
154 $nav[$key]['active'] = true; 158 $nav[$key]['active'] = true;
155 } 159 }
156 break; 160 break;
157 case 3: 161 case 3:
158 - if($vo['typeId'] == 3){ 162 + if ($vo['typeId'] == 3) {
159 $nav[$key]['active'] = true; 163 $nav[$key]['active'] = true;
160 } 164 }
161 break; 165 break;
162 case 4: 166 case 4:
163 - if($vo['typeId'] == 4){ 167 + if ($vo['typeId'] == 4) {
164 $nav[$key]['active'] = true; 168 $nav[$key]['active'] = true;
165 } 169 }
166 break; 170 break;
@@ -169,7 +173,6 @@ class OrderModel @@ -169,7 +173,6 @@ class OrderModel
169 } 173 }
170 } 174 }
171 return $nav; 175 return $nav;
172 -  
173 } 176 }
174 177
175 } 178 }