|
@@ -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('该组件已存在此皮肤的预览图!');
|
|
|
}
|