国家使用本地的
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user