Ver Fonte

修改接口:更新组件预览图

15313670163 há 1 dia atrás
pai
commit
f8e3a89113
1 ficheiros alterados com 2 adições e 7 exclusões
  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('该组件已存在此皮肤的预览图!');
             }