作者 刘锟

update

@@ -401,18 +401,20 @@ class ProductLogic extends BaseLogic @@ -401,18 +401,20 @@ class ProductLogic extends BaseLogic
401 //处理图片 401 //处理图片
402 $img_arr = explode(',',$data[7]); 402 $img_arr = explode(',',$data[7]);
403 foreach ($img_arr as $v_img){ 403 foreach ($img_arr as $v_img){
404 - $one_img = CosService::uploadRemote($project_id,'image_product',$v_img);  
405 - if($one_img){  
406 - $one_gallery = [  
407 - 'alt' => '这是一张产品图',  
408 - 'url' => $one_img  
409 - ]; 404 + if($v_img){
  405 + $one_img = CosService::uploadRemote($project_id,'image_product',$v_img);
  406 + if($one_img){
  407 + $one_gallery = [
  408 + 'alt' => '这是一张产品图',
  409 + 'url' => $one_img
  410 + ];
410 411
411 - if(!$thumb){  
412 - $thumb = Arr::a2s($one_gallery);  
413 - } 412 + if(!$thumb){
  413 + $thumb = Arr::a2s($one_gallery);
  414 + }
414 415
415 - $gallery[] = $one_gallery; 416 + $gallery[] = $one_gallery;
  417 + }
416 } 418 }
417 } 419 }
418 } 420 }