Authored by yangyang

改动格式

@@ -495,7 +495,11 @@ class HomeController extends AbstractAction @@ -495,7 +495,11 @@ class HomeController extends AbstractAction
495 if (!empty($data)) { 495 if (!empty($data)) {
496 $order['orders'] = $data; 496 $order['orders'] = $data;
497 } else { 497 } else {
498 - $order['walkwayUrl'] = 'http://www.baidu.com'; 498 + if ($page > 1) {
  499 + echo " ";
  500 + } else {
  501 + $order['walkwayUrl'] = 'http://www.baidu.com';
  502 + }
499 } 503 }
500 //渲染模板 504 //渲染模板
501 $this->_view->display('order-content', $order); 505 $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 }