Browse Source

fix: 评论

super-yimizi 1 month ago
parent
commit
bf9ac7aa8c
1 changed files with 3 additions and 7 deletions
  1. 3 7
      application/api/controller/Comment.php

+ 3 - 7
application/api/controller/Comment.php

@@ -60,13 +60,9 @@ class Comment extends Base
         $pid = isset($params['pid']) ? (int)$params['pid'] : 0;
         $order_id = (int)$params['order_id'];
         $remark = $params['remark'];
-
-        try {
-            CommentService::addComment($this->auth->id, $order_id, $remark, $pid);
-            $this->success('添加评论成功,等待审核!');
-        } catch (\Exception $e) {
-            $this->error($e->getMessage());
-        }
+        CommentService::addComment($this->auth->id, $order_id, $remark, $pid);
+        $this->success('添加评论成功,等待审核!');
+       
     }
 
     /**