|
...
|
...
|
@@ -144,8 +144,20 @@ class ComController extends BaseController |
|
|
|
}
|
|
|
|
|
|
|
|
public function ceshi(){
|
|
|
|
// $from = new FormGlobalsoApi();
|
|
|
|
// $list = $from->getInquiryList('https://demomark.globalso.com/','',1,100000000);
|
|
|
|
// return $list;
|
|
|
|
$inquiry_list = (new FormGlobalsoApi())->getInquiryList('https://demomark.globalso.com/','',1,100000000);
|
|
|
|
//询盘国家统计
|
|
|
|
$countryData = $inquiry_list['data']['data'];
|
|
|
|
$countryArr = [];
|
|
|
|
foreach ($countryData as $v1){
|
|
|
|
if(isset($countryArr[$v1['country']])){
|
|
|
|
$countryArr[$v1['country']]++;
|
|
|
|
}else{
|
|
|
|
$countryArr[$v1['country']] = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
arsort($countryArr);
|
|
|
|
$top20 = array_slice($countryArr, 0, 20, true);
|
|
|
|
return $top20;
|
|
|
|
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|