service = ProjectService::getInstance(); $this->insertField = [ 'title', 'features', 'cover', 'labels', 'description', 'category_id', 'video_url', 'price', 'front', 'service', 'deploy', 'status', 'module_image', 'flowchart']; $this->updateField = [ 'id', 'title', 'features', 'cover', 'labels', 'description', 'category_id', 'video_url', 'price', 'front', 'service', 'deploy', 'status', 'module_image', 'flowchart']; $this->notRequest = ['screenshots', 'preferential_price', 'content']; } /** * 修改项目内容 * @Method POST * @return JsonResponse * @throws Exception */ public function changeContent(): JsonResponse { $id = request()->post('id'); $content = request()->post('content'); if (empty($id) || empty($content)) { return jerr('参数错误'); } return jok( $this->service->changeContent($id, $content), '修改成功' ); } /** * 修改项目内容 * @Method POST * @return JsonResponse * @throws Exception */ public function changeType(): JsonResponse { $id = request()->post('id'); $type = request()->post('type'); if (empty($id) || empty($type)) { return jerr('参数错误'); } return jok( $this->service->changeType($id, $type), '修改成功' ); } }