合并分支 'akun' 到 'master'
update 查看合并请求 !3359
正在显示
1 个修改的文件
包含
8 行增加
和
2 行删除
| @@ -150,12 +150,18 @@ class GeoQuestionLogic extends BaseLogic | @@ -150,12 +150,18 @@ class GeoQuestionLogic extends BaseLogic | ||
| 150 | if(!empty($data)){ | 150 | if(!empty($data)){ |
| 151 | $temp = []; | 151 | $temp = []; |
| 152 | foreach ($data as $item){ | 152 | foreach ($data as $item){ |
| 153 | - $temp[$item['question']][] = $item['platform']; | 153 | + if(empty($temp[$item['question']])){ |
| 154 | + $temp[$item['question']][] = $item['platform']; | ||
| 155 | + }else{ | ||
| 156 | + if(!in_array($item['platform'],$temp[$item['question']])){ | ||
| 157 | + $temp[$item['question']][] = $item['platform']; | ||
| 158 | + } | ||
| 159 | + } | ||
| 154 | } | 160 | } |
| 155 | 161 | ||
| 156 | if(!empty($temp)){ | 162 | if(!empty($temp)){ |
| 157 | foreach ($temp as $kt=>$vt){ | 163 | foreach ($temp as $kt=>$vt){ |
| 158 | - $list[] = ['question'=>$kt,'platform'=>array_unique($vt)]; | 164 | + $list[] = ['question'=>$kt,'platform'=>$vt]; |
| 159 | } | 165 | } |
| 160 | } | 166 | } |
| 161 | } | 167 | } |
-
请 注册 或 登录 后发表评论