作者 刘锟

update

@@ -823,6 +823,31 @@ class ProductLogic extends BaseLogic @@ -823,6 +823,31 @@ class ProductLogic extends BaseLogic
823 CategoryRelated::saveRelated($id, $category_arr); 823 CategoryRelated::saveRelated($id, $category_arr);
824 } 824 }
825 return true; 825 return true;
  826 + }else{
  827 + $gallery = [];
  828 + $thumb = '';
  829 + if($data[7]??''){
  830 + //处理图片
  831 + $img_arr = explode('^v6sp$',$data[7]);
  832 + foreach ($img_arr as $v_img){
  833 + if($v_img){
  834 + $one_img = check_remote_url_down($v_img,$project_id,$domain);
  835 + if($one_img){
  836 + $one_gallery = [
  837 + 'alt' => '',
  838 + 'url' => $one_img
  839 + ];
  840 +
  841 + if(!$thumb){
  842 + $thumb = Arr::a2s($one_gallery);
  843 + }
  844 +
  845 + $gallery[] = $one_gallery;
  846 + }
  847 + }
  848 + }
  849 + }
  850 + $this->model->edit(['thumb'=>$thumb,'gallery' => Arr::a2s($gallery)],['id'=>$product['id']]);
826 } 851 }
827 return false; 852 return false;
828 } 853 }