|
@@ -415,15 +415,14 @@ class SiteController extends BaseController
|
|
|
|
|
|
|
|
public function actionCountries()
|
|
public function actionCountries()
|
|
|
{
|
|
{
|
|
|
- // 国家列表
|
|
|
|
|
- $data = Cache::getCountries();
|
|
|
|
|
|
|
+ $countryId = User::getEnCodeInfo(\Yii::$app->user->id)['COUNTRY_ID'];
|
|
|
|
|
+ $countries = array_filter(Cache::getCountries(), fn($country) => $country['ID'] === $countryId);
|
|
|
|
|
|
|
|
- return static::notice(['data' => $data]);
|
|
|
|
|
|
|
+ return static::notice(['data' => array_values($countries)]);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function actionLanguages()
|
|
public function actionLanguages()
|
|
|
{
|
|
{
|
|
|
- // 语言列表
|
|
|
|
|
$data = Cache::getLanguages();
|
|
$data = Cache::getLanguages();
|
|
|
|
|
|
|
|
return static::notice(['data' => $data]);
|
|
return static::notice(['data' => $data]);
|