get('page', 1); $limit = $request->get('limit', 10); $keywords = $request->get('keywords', ''); return ConfigService::configList($page, $limit, $keywords); } /** * @Desc 配置详情 * @Author Gorden * @Date 2024/2/22 16:36 * * @param $id * @return \support\Response */ public function configInfo($id) { return ConfigService::configInfo($id); } /** * @Desc 添加配置 * @Author Gorden * @Date 2024/2/22 15:57 * * @param Request $request * @return \support\Response */ public function addConfig(Request $request) { $validate = new ConfigValidate(); if (!$validate->scene('add')->check($request->post())) { return json_fail($validate->getError()); } return ConfigService::addConfig($request->post()); } /** * @Desc 修改配置 * @Author Gorden * @Date 2024/2/22 16:24 * * @param $id * @param Request $request * @return \support\Response */ public function updateConfig($id, Request $request) { $validate = new ConfigValidate(); if (!$validate->scene('update')->check($request->post())) { return json_fail($validate->getError()); } return ConfigService::updateConfig($id, $request->post()); } /** * @Desc 修改配置状态 * @Author Gorden * @Date 2024/2/22 16:38 * * @param $id * @param Request $request * @return \support\Response */ public function updateStatus($id, Request $request) { $validate = new ConfigValidate(); if (!$validate->scene('update_status')->check($request->post())) { return json_fail($validate->getError()); } return ConfigService::updateStatus($id, $request->post()); } /** * @Desc 删除配置 * @Author Gorden * @Date 2024/2/22 16:39 * * @param $id * @return \support\Response */ public function delConfig($id) { return ConfigService::delConfig($id); } }