我的收藏

This commit is contained in:
2025-11-26 17:35:38 +08:00
parent a924959365
commit 12812fa775
5 changed files with 68 additions and 8 deletions
@@ -6,6 +6,7 @@ use app\common\model\User;
use app\common\service\OssService;
use app\common\traits\crud\CrudControllerTrait;
use app\common\service\PostCommentService;
use support\Request;
class PostCommentController extends BaseController
{
@@ -41,4 +42,20 @@ class PostCommentController extends BaseController
}
return $data;
}
/**
* 删除
*
* @param Request $request 请求对象
* @return mixed 返回删除操作结果
*/
public function delete(Request $request)
{
try {
$count = $this->service->serviceDelete($request);
return $this->success([], "删除评论成功");
} catch (\Throwable $e) {
return $this->error($e->getMessage().$e->getLine().$e->getFile());
}
}
}