...
|
...
|
@@ -121,55 +121,58 @@ class OrderModel |
|
|
}
|
|
|
return $arr;
|
|
|
}
|
|
|
|
|
|
|
|
|
//根据type值设置nav属性
|
|
|
public function getNavs($type){
|
|
|
public function getNavs($type) {
|
|
|
$nav = array(
|
|
|
array(
|
|
|
'name' => '全部',
|
|
|
'typeId' => '1'
|
|
|
'typeId' => '1',
|
|
|
'url' => '/home/order?type=1'
|
|
|
),
|
|
|
array(
|
|
|
'name' => '待付款',
|
|
|
'typeId' => '2'
|
|
|
'typeId' => '2',
|
|
|
'url' => '/home/order?type=2'
|
|
|
),
|
|
|
array(
|
|
|
'name' => '待发货',
|
|
|
'typeId' => '3'
|
|
|
'typeId' => '3',
|
|
|
'url' => '/home/order?type=3'
|
|
|
),
|
|
|
array(
|
|
|
'name' => '待收货',
|
|
|
'typeId' => '4'
|
|
|
'typeId' => '4',
|
|
|
'url' => '/home/order?type=4'
|
|
|
)
|
|
|
);
|
|
|
foreach($nav as $key => $vo){
|
|
|
switch ($type) {
|
|
|
case 1:
|
|
|
if($vo['typeId'] == 1){
|
|
|
$nav[$key]['active'] = true;
|
|
|
}
|
|
|
break;
|
|
|
case 2:
|
|
|
if($vo['typeId'] == 2){
|
|
|
$nav[$key]['active'] = true;
|
|
|
}
|
|
|
break;
|
|
|
case 3:
|
|
|
if($vo['typeId'] == 3){
|
|
|
$nav[$key]['active'] = true;
|
|
|
}
|
|
|
break;
|
|
|
case 4:
|
|
|
if($vo['typeId'] == 4){
|
|
|
$nav[$key]['active'] = true;
|
|
|
}
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
foreach ($nav as $key => $vo) {
|
|
|
switch ($type) {
|
|
|
case 1:
|
|
|
if ($vo['typeId'] == 1) {
|
|
|
$nav[$key]['active'] = true;
|
|
|
}
|
|
|
break;
|
|
|
case 2:
|
|
|
if ($vo['typeId'] == 2) {
|
|
|
$nav[$key]['active'] = true;
|
|
|
}
|
|
|
break;
|
|
|
case 3:
|
|
|
if ($vo['typeId'] == 3) {
|
|
|
$nav[$key]['active'] = true;
|
|
|
}
|
|
|
break;
|
|
|
case 4:
|
|
|
if ($vo['typeId'] == 4) {
|
|
|
$nav[$key]['active'] = true;
|
|
|
}
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
return $nav;
|
|
|
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|