AI 1 ヶ月 前
コミット
98506505e5
2 ファイル変更2 行追加1 行削除
  1. 1 1
      app/JsonRpc/NewsService.php
  2. 1 0
      composer.json

+ 1 - 1
app/JsonRpc/NewsService.php

@@ -408,7 +408,7 @@ class NewsService implements NewsServiceInterface
             }
 
             $data['cat_arr_id'] = is_array($data['cat_arr_id']) ? json_encode($data['cat_arr_id']) : '';
-            $data['tag'] = is_array($data['tag']) ? json_encode($data['tag']) : '';
+            $data['tag'] = isset($data['tag']) ? json_encode($data['tag']) : '';
             $articleData = $data;
             unset($articleData['content']);
             unset($articleData['status_name']);

+ 1 - 0
composer.json

@@ -14,6 +14,7 @@
     "require": {
         "php": ">=8.1",
         "doctrine/annotations": "^2.0",
+        "fukuball/jieba-php": "^0.34.0",
         "hyperf/cache": "~3.1.0",
         "hyperf/command": "~3.1.0",
         "hyperf/config": "~3.1.0",