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