作者 刘锟

合并分支 'akun' 到 'master'

update



查看合并请求 !3359
@@ -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 }