2025-03-14 14:27:33 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace app\controller;
|
|
|
|
|
|
|
|
|
|
use app\model\CarType;
|
|
|
|
|
use app\model\Customer;
|
2025-03-17 18:01:53 +08:00
|
|
|
use app\util\Util;
|
2025-03-14 14:27:33 +08:00
|
|
|
use PDO;
|
|
|
|
|
use support\Db;
|
|
|
|
|
use support\Redis;
|
|
|
|
|
use support\Request;
|
|
|
|
|
|
|
|
|
|
class CarTypeController
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public function getAll(Request $request)
|
|
|
|
|
{
|
|
|
|
|
$list = CarType::getAll();
|
2025-03-25 09:06:08 +08:00
|
|
|
|
|
|
|
|
if($request->user['language'] != 'zh_CN'){
|
|
|
|
|
foreach ($list as $key => &$value) {
|
|
|
|
|
$value['name'] = $value['name_en'];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-17 18:01:53 +08:00
|
|
|
return Util::success($list);
|
2025-03-14 14:27:33 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|