Browse Source

采集商品详情问题修复

吴昊天 2 years atrás
parent
commit
b0229be953

+ 1 - 1
crmeb/app/services/order/StoreOrderCreateServices.php

@@ -282,7 +282,7 @@ class StoreOrderCreateServices extends BaseServices
         /** @var StoreOrderCartInfoServices $cartServices */
         /** @var StoreOrderCartInfoServices $cartServices */
         $cartServices = app()->make(StoreOrderCartInfoServices::class);
         $cartServices = app()->make(StoreOrderCartInfoServices::class);
         $priceData['coupon_id'] = $couponId;
         $priceData['coupon_id'] = $couponId;
-        $order = $this->transaction(function () use ($cartIds, $orderInfo, $cartInfo, $key, $userInfo, $useIntegral, $priceData, $combinationId, $seckillId, $bargainId, $cartServices, $seckillServices, $uid, $addressId, $advanceId) {
+        $order = $this->transaction(function () use ($cartIds, $orderInfo, $cartInfo, $key, $userInfo, $useIntegral, $priceData, $combinationId, $seckillId, $bargainId, $cartServices, $uid, $addressId, $advanceId) {
             //创建订单
             //创建订单
             $order = $this->dao->save($orderInfo);
             $order = $this->dao->save($orderInfo);
             if (!$order) {
             if (!$order) {

+ 2 - 3
crmeb/app/services/product/product/StoreProductServices.php

@@ -654,7 +654,7 @@ class StoreProductServices extends BaseServices
 
 
                 //采集商品下载图片
                 //采集商品下载图片
                 if ($type == -1) {
                 if ($type == -1) {
-                    $s_image_down = $d_image_down = [];
+                    $s_image_down = [];
                     //下载商品轮播图
                     //下载商品轮播图
                     foreach ($slider_image as $s_image) {
                     foreach ($slider_image as $s_image) {
                         if (sys_config('queue_open', 0) == 1) {
                         if (sys_config('queue_open', 0) == 1) {
@@ -671,8 +671,7 @@ class StoreProductServices extends BaseServices
                         if (sys_config('queue_open', 0) == 1) {
                         if (sys_config('queue_open', 0) == 1) {
                             ProductCopyJob::dispatch('copyDescriptionImage', [$res->id, $description, $d_image, count($match[1])]);
                             ProductCopyJob::dispatch('copyDescriptionImage', [$res->id, $description, $d_image, count($match[1])]);
                         } else {
                         } else {
-                            if (!is_int(strpos($d_image, 'http'))) $d_image = 'http://' . ltrim($d_image, '\//');
-                            $d_image_down[] = $d_img = app()->make(CopyTaobaoServices::class)->downloadCopyImage($d_image);
+                            $d_img = app()->make(CopyTaobaoServices::class)->downloadCopyImage(!is_int(strpos($d_image, 'http')) ? 'http://' . ltrim($d_image, '\//') : $d_image);
                             $description = str_replace($d_image, $d_img, $description);
                             $description = str_replace($d_image, $d_img, $description);
                         }
                         }
                     }
                     }