浏览代码

Merge branch 'bugfix_03_13_admin_liu' into dev

rkljw 1 月之前
父节点
当前提交
dcc418c2b8
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      app/JsonRpc/NewsService.php

+ 3 - 0
app/JsonRpc/NewsService.php

@@ -121,6 +121,9 @@ class NewsService implements NewsServiceInterface
      */
     public function addCategory(array $data): array
     {
+        if(isset($data['id'])){
+            unset($data['id']);
+        }
         $id = Category::insertGetId($data);
         if (empty($id)) {
             return Result::error("添加失败");