作者 lyh

gx

@@ -146,14 +146,15 @@ class ComController extends BaseController @@ -146,14 +146,15 @@ class ComController extends BaseController
146 public function ceshi(){ 146 public function ceshi(){
147 $from = new FormGlobalsoApi(); 147 $from = new FormGlobalsoApi();
148 $list = $from->getInquiryList('https://demomark.globalso.com/','',1,100000000); 148 $list = $from->getInquiryList('https://demomark.globalso.com/','',1,100000000);
149 -// $arr = [];  
150 -// foreach ($list['data'] as $k => $v){  
151 -// if(isset($arr[$v['country']])){  
152 -// $arr[$v['country']]['num']++;  
153 -// }else{  
154 -// $arr[$v['country']]['num'] = 0;  
155 -// }  
156 -// }  
157 - return (array)$list['data']['data']; 149 + $data = $list['data']['data'];
  150 + $arr = [];
  151 + foreach ($data as $k => $v){
  152 + if(isset($arr[$v['country']])){
  153 + $arr[$v['country']]['num']++;
  154 + }else{
  155 + $arr[$v['country']]['num'] = 0;
  156 + }
  157 + }
  158 + return $arr;
158 } 159 }
159 } 160 }