Authored by Rock Zhang

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

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