FengR 2 месяцев назад
Родитель
Сommit
499a94884f
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      app/JsonRpc/PublicRpcService.php

+ 2 - 1
app/JsonRpc/PublicRpcService.php

@@ -4339,11 +4339,12 @@ class PublicRpcService implements PublicRpcServiceInterface
                 $query->where('id','!=',$where['id']);
             })->pluck('component_keyword')->toArray();
         }
+        // return Result::success($arr_keyword);
         foreach($all_keywords as $key => $value){
             // $value_keyword[$key] = $value;
             $value_keyword = json_decode($value ?? '[]',true);
             $repeat_keywords = array_intersect($arr_keyword,$value_keyword);
-            if(count($repeat_keywords) == count($keyword)){
+            if(count($repeat_keywords) == count($keyword) && count($repeat_keywords) == count($value_keyword)){
                 return Result::error('此'.$type.'关键词已存在!');
             }
         }