Authored by whb

修改brands参数

@@ -50,9 +50,11 @@ class IndexController extends WebAction @@ -50,9 +50,11 @@ class IndexController extends WebAction
50 'rowNum' => FILTER_VALIDATE_INT, 50 'rowNum' => FILTER_VALIDATE_INT,
51 'page' => FILTER_VALIDATE_INT,), false); 51 'page' => FILTER_VALIDATE_INT,), false);
52 52
53 - //字符转码  
54 - foreach ($condition as &$value) {  
55 - $value = rawurldecode($value); 53 + if(!empty($condition)) {
  54 + //字符转码
  55 + foreach ($condition as &$value) {
  56 + $value = rawurldecode($value);
  57 + }
56 } 58 }
57 //传品牌ID参数 59 //传品牌ID参数
58 $condition['brand'] = $brandId; 60 $condition['brand'] = $brandId;
@@ -63,7 +65,7 @@ class IndexController extends WebAction @@ -63,7 +65,7 @@ class IndexController extends WebAction
63 65
64 //每页显示商品数 66 //每页显示商品数
65 if(!isset($condition['viewNum']) || empty($condition['viewNum'])){ 67 if(!isset($condition['viewNum']) || empty($condition['viewNum'])){
66 - $condition['viewNum'] =60; 68 + $condition['viewNum'] = 60;
67 } 69 }
68 $view_num_arr = array(60, 100, 200); 70 $view_num_arr = array(60, 100, 200);
69 if (!in_array($condition['viewNum'], $view_num_arr)) { 71 if (!in_array($condition['viewNum'], $view_num_arr)) {
@@ -89,8 +91,8 @@ class IndexController extends WebAction @@ -89,8 +91,8 @@ class IndexController extends WebAction
89 'minImgSize' => $minImgSize, 91 'minImgSize' => $minImgSize,
90 'gender' => $gender, 92 'gender' => $gender,
91 'needPd' => 'Y', 93 'needPd' => 'Y',
92 - 'rowNum' =>$condition['rowNum'],  
93 - 'viewNum' =>$condition['viewNum'], 94 + 'rowNum' => $condition['rowNum'],
  95 + 'viewNum' => $condition['viewNum'],
94 ); 96 );
95 97
96 $params = $condition + $_GET; 98 $params = $condition + $_GET;