ソースを参照

Merge branch '20250522_diywebfr'

15313670163 19 時間 前
コミット
a43b7b1136
1 ファイル変更2 行追加7 行削除
  1. 2 7
      app/JsonRpc/PublicRpcService.php

+ 2 - 7
app/JsonRpc/PublicRpcService.php

@@ -2654,13 +2654,8 @@ class PublicRpcService implements PublicRpcServiceInterface
         if(empty($component)){
             return Result::error('组件不存在!');
         }
-
-        $img = ComponentImg::where('id','!=',$data['id'])->where('component_id',$data['component_id'])->where('template_id',$data['template_id'])->get()->all();
-        if(!empty($img)){
-            return Result::error('该组件已存在此皮肤的预览图!');
-        }
-         if($component['type_id'] == 11){
-             $img = ComponentImg::where('component_id',$data['component_id'])->where('template_id',$data['template_id'])->get()->all();
+        if($component['type_id'] == 11){
+            $img = ComponentImg::where('id','!=',$data['id'])->where('component_id',$data['component_id'])->where('template_id',$data['template_id'])->get()->all();
             if(!empty($img)){
                 return Result::error('该组件已存在此皮肤的预览图!');
             }