Authored by Rock Zhang

修复商品搜索排序错误的bug

@@ -55,14 +55,17 @@ class ListProcess @@ -55,14 +55,17 @@ class ListProcess
55 * 处理筛选数据 55 * 处理筛选数据
56 * 56 *
57 * @param $data 57 * @param $data
58 - * @param string | integer $gender 默认选择的性别,默认0表示所有 58 + * @param string | integer $gender 默认选择的性别,默认1,2,3表示所有
59 * @return array 处理之后的筛选数据 59 * @return array 处理之后的筛选数据
60 */ 60 */
61 - public static function getFilterData($data, $gender = 0) 61 + public static function getFilterData($data, $gender = '1,2,3')
62 { 62 {
63 // 过滤条件数据 63 // 过滤条件数据
64 $filters = array('classify'=>array()); 64 $filters = array('classify'=>array());
65 65
  66 + // 返回数据中有没有gender时要添加gender
  67 + // $data['gender'] = array('2,3'=>'GIRLS','1,3'=>'BOYS');
  68 +
66 $num = 1; 69 $num = 1;
67 foreach ($data as $key => $val) { 70 foreach ($data as $key => $val) {
68 if(empty($val)) 71 if(empty($val))
@@ -161,7 +161,7 @@ class Helpers @@ -161,7 +161,7 @@ class Helpers
161 break; 161 break;
162 case 'newest': 162 case 'newest':
163 default: 163 default:
164 - $result = ($order == 0) ? 's_t_desc' : 's_t_asc'; 164 + $result = ($order == 1) ? 's_t_desc' : 's_t_asc';
165 break; 165 break;
166 } 166 }
167 167
@@ -57,6 +57,8 @@ class BoysController extends AbstractAction @@ -57,6 +57,8 @@ class BoysController extends AbstractAction
57 57
58 $this->echoJson($bottomBanner); 58 $this->echoJson($bottomBanner);
59 } while (false); 59 } while (false);
  60 +
  61 + echo ' ';
60 } 62 }
61 63
62 } 64 }
@@ -53,6 +53,8 @@ class GirlsController extends AbstractAction @@ -53,6 +53,8 @@ class GirlsController extends AbstractAction
53 $this->echoJson($bottomBanner); 53 $this->echoJson($bottomBanner);
54 54
55 } while (false); 55 } while (false);
  56 +
  57 + echo ' ';
56 } 58 }
57 59
58 } 60 }