From d70f7c8285bf5ec68bc07c23eb06336137225b88 Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Tue, 16 Sep 2025 14:16:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=A3=85=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/VehModificationController.php | 47 +++++++++++++++++++ config/route.php | 9 ++++ 2 files changed, 56 insertions(+) create mode 100644 app/common/controller/VehModificationController.php diff --git a/app/common/controller/VehModificationController.php b/app/common/controller/VehModificationController.php new file mode 100644 index 0000000..314ca40 --- /dev/null +++ b/app/common/controller/VehModificationController.php @@ -0,0 +1,47 @@ +service = new VehModificationService(); + } + + /** + * 列表页数据格式化 + * + * @param array $data + * @return array + */ + protected function indexFormat($data) + { + if (isset($data['created_at'])) + $data['created_at'] = date('Y-m-d H:i:s', $data['created_at']); + if (isset($data['updated_at'])) + $data['updated_at'] = date('Y-m-d H:i:s', $data['updated_at']); + return $data; + } + + /** + * 数据格式化 + * + * @param array $data + * @return array + */ + protected function showFormat($data) + { + if (isset($data['created_at'])) + $data['created_at'] = date('Y-m-d H:i:s', $data['created_at']); + if (isset($data['updated_at'])) + $data['updated_at'] = date('Y-m-d H:i:s', $data['updated_at']); + return $data; + } +} \ No newline at end of file diff --git a/config/route.php b/config/route.php index 75a2ebe..05cf625 100644 --- a/config/route.php +++ b/config/route.php @@ -417,4 +417,13 @@ Route::group('/crm', function () { Route::any('/destroy', [app\common\controller\VehVehicleSkuController::class, 'destroy']); }); }); + + // 汽车改装项目 + Route::group('/modification', function () { + Route::any('/list', [app\common\controller\VehModificationController::class, 'index']); + Route::any('/show', [app\common\controller\VehModificationController::class, 'show']); + Route::any('/store', [app\common\controller\VehModificationController::class, 'store']); + Route::any('/update', [app\common\controller\VehModificationController::class, 'update']); + Route::any('/destroy', [app\common\controller\VehModificationController::class, 'destroy']); + }); }); \ No newline at end of file