国家使用本地的

This commit is contained in:
2025-04-16 10:26:33 +08:00
parent 01b57eb9b3
commit 4279935c32
+1 -13
View File
@@ -45,19 +45,7 @@ class AreaController
public function getCountry (Request $request)
{
$list = RedisHelper::get("rpc_country");
$list = null;
if(!$list){
$res = HttpClient::get(config('const.rpc_domain') . '/country/all');
if ($res['code'] != 200 && $res['data']['code'] != 0){
Log::info('register_rpc',$res);
return Util::fail($res, trans('register_fail'));
}
$list = $res['data']['data']['data'];
RedisHelper::set("rpc_country", $list, 600);
}
// $list = Country::get()->toArray();
$list = Country::get()->toArray();
$language = 'en_addr';
if($request->user['language'] == 'zh_CN'){
$language = 'cn_addr';