合并分支 'akun' 到 'master'
Akun 查看合并请求 !369
正在显示
1 个修改的文件
包含
25 行增加
和
0 行删除
| @@ -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 | } |
-
请 注册 或 登录 后发表评论