Explorar el Código

Merge branch 'master' of http://git.bjzxtw.org.cn:3000/zxt/public_producer

LiuJ hace 4 meses
padre
commit
fa27796351
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      app/JsonRpc/PublicRpcService.php

+ 2 - 2
app/JsonRpc/PublicRpcService.php

@@ -920,8 +920,8 @@ class PublicRpcService implements PublicRpcServiceInterface
         //     return Result::error("默认皮肤不能删除", 0);
         // }
         $component_img = ComponentImg::where('template_id',$template['template_id'])->get();
-        if(!empty($component_img)){
-            return Result::error('此皮肤已绑定组件预览图,不可删除!');
+        if(!empty($component_img) && $component_img->count() > 0){
+            return Result::error('此皮肤已绑定组件预览图,不可删除!'.$component_img);
         }
         $result = Template::where('id', $data['id'])->delete();
         var_dump($result, '-------------------delete');