|
...
|
...
|
@@ -146,14 +146,15 @@ class ComController extends BaseController |
|
|
|
public function ceshi(){
|
|
|
|
$from = new FormGlobalsoApi();
|
|
|
|
$list = $from->getInquiryList('https://demomark.globalso.com/','',1,100000000);
|
|
|
|
// $arr = [];
|
|
|
|
// foreach ($list['data'] as $k => $v){
|
|
|
|
// if(isset($arr[$v['country']])){
|
|
|
|
// $arr[$v['country']]['num']++;
|
|
|
|
// }else{
|
|
|
|
// $arr[$v['country']]['num'] = 0;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
return (array)$list['data']['data'];
|
|
|
|
$data = $list['data']['data'];
|
|
|
|
$arr = [];
|
|
|
|
foreach ($data as $k => $v){
|
|
|
|
if(isset($arr[$v['country']])){
|
|
|
|
$arr[$v['country']]['num']++;
|
|
|
|
}else{
|
|
|
|
$arr[$v['country']]['num'] = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $arr;
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|