|
|
@@ -182,15 +182,13 @@ class SiteController extends BaseController
|
|
|
// 国家
|
|
|
$countries = Cache::getCountries();
|
|
|
|
|
|
- if (\Yii::$app->request->hasProperty('filter')) {
|
|
|
- $filter = \Yii::$app->request->get('filter');
|
|
|
- if ($filter) {
|
|
|
- $adminId = Yii::$app->getUser()->getUserInfo()['id'];
|
|
|
- $adminCountry = AdminCountry::getCountry($adminId);
|
|
|
-
|
|
|
- $countries = array_filter($countries, fn($country) => in_array($country['ID'], $adminCountry));
|
|
|
- $countries = array_values($countries);
|
|
|
- }
|
|
|
+ $filter = \Yii::$app->request->get('filter', 0);
|
|
|
+ if ($filter) {
|
|
|
+ $adminId = Yii::$app->getUser()->getUserInfo()['id'];
|
|
|
+ $adminCountry = AdminCountry::getCountry($adminId);
|
|
|
+
|
|
|
+ $countries = array_filter($countries, fn($country) => in_array($country['ID'], $adminCountry));
|
|
|
+ $countries = array_values($countries);
|
|
|
}
|
|
|
|
|
|
// 货币
|