|
@@ -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('删除组件预览图失败!');
|
|
|
}
|