Authored by 郝肖肖

筛选性别 修复

... ... @@ -62,6 +62,7 @@ class ListProcess
$filters = array('classify' => array());
// tar modified 1606151500 返回数据中没有gender时要添加gender
if (empty($data['gender'])) {
switch ($gender) {
case '1,3':
$data['gender'] = array('1,3' => 'BOYS');
... ... @@ -73,6 +74,7 @@ class ListProcess
$data['gender'] = array('1,3' => 'BOYS', '2,3' => 'GIRLS');
break;
}
}
$num = 1;
foreach ($data as $key => $val) {
... ... @@ -221,18 +223,16 @@ class ListProcess
)
);
// tar add 1606151500 处理性别参数
switch ($gender) {
foreach ($data as $key => $value) {
switch ($key) {
case '1,3':
array_push($result['subs'], array('dataId' => '1,3', 'name' => 'BOYS'));
break;
case '2,3':
array_push($result['subs'], array('dataId' => '2,3', 'name' => 'GIRLS'));
array_push($result['subs'], array('dataId' => $key, 'name' => $value));
break;
default:
array_push($result['subs'], array('dataId' => '1,3', 'name' => 'BOYS'), array('dataId' => '2,3', 'name' => 'GIRLS'));
break;
}
}
// 处理选中状态
foreach ($result['subs'] as &$val) {
... ...