车辆多语言修复

This commit is contained in:
2025-05-13 15:29:30 +08:00
parent af0e8bc62f
commit 21b19109d0
8 changed files with 198 additions and 86 deletions
@@ -152,8 +152,24 @@ class LocationController extends Crud
*/
public function getAll()
{
$lang = session('lang', 'zh-cn');
switch ($lang) {
case 'zh-cn':
$hz = new \app\model\Location();
break;
$locations = Location::get();
case 'en':
$hz = new \app\model\LocationEn();
break;
case 'ru':
$hz = new \app\model\LocationRu();
break;
case 'ar':
$hz = new \app\model\LocationAr();
break;
}
$locations = $hz::get();
return Util::success($locations);
}