Преглед на файлове

Merge branch '20250522_diywebfr'

15313670163 преди 1 ден
родител
ревизия
fb49ab206c
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      app/JsonRpc/PublicRpcService.php

+ 3 - 3
app/JsonRpc/PublicRpcService.php

@@ -1661,10 +1661,10 @@ class PublicRpcService implements PublicRpcServiceInterface
                     }
                 }
             }
-            $component_img = ComponentImg::where('component_id',$component['component_type'])->get();
+            $component_img = ComponentImg::where('component_id',$component['component_type'])->first();
             if(!empty($component_img)){
-                $component_img = ComponentImg::where('component_id',$component['component_type'])->delete();
-                if(empty($component_img)){
+                $del_img = ComponentImg::where('component_id',$component['component_type'])->delete();
+                if(empty($del_img)){
                     Db::rollBack();
                     return Result::error('删除组件预览图失败!');
                 }