作者 lyh

gx

... ... @@ -1226,7 +1226,7 @@ public static function getCountryNameByAlpha3($alpha3) {
if (array_key_exists($alpha3, $countries)) {
return $countries[$alpha3];
} else {
return false;
return 'no';
}
}
... ...
... ... @@ -41,7 +41,7 @@ class GoogleSearchController extends BaseController
if($this->param['type'] == 'country'){
$country = [];
foreach ($data['list'] as $val){
$country[] = Country::getCountryNameByAlpha3($val['keys']);
$country[] = Country::getCountryNameByAlpha3(strtoupper($val['keys']));
}
$zh_country = Translate::tran($country, 'zh');
foreach ($data['list'] as $key => $val){
... ...