Sfoglia il codice sorgente

商城,sku组图

lizhen_gitee 5 mesi fa
parent
commit
7752f58904
2 ha cambiato i file con 5 aggiunte e 4 eliminazioni
  1. 4 3
      addons/shopro/controller/goods/Goods.php
  2. 1 1
      application/config.php

+ 4 - 3
addons/shopro/controller/goods/Goods.php

@@ -53,7 +53,7 @@ class Goods extends Common
 //        $goods = $service->paginate();
         $goods = $service->select_autopage();
         $goods = collection($goods)->toArray();
-        $goods = list_domain_image($goods,['image']);
+        $goods = list_domain_image($goods,['image']);//主图
 
         $this->success('获取成功', $goods);
     }
@@ -129,8 +129,9 @@ class Goods extends Common
         $skuPrices = $goods['new_sku_prices'];
         $content = $goods['content'];
         $goods = $goods->toArray();
-        $goods['image'] = localpath_to_netpath($goods['image']);
-        $goods['images'] = array_domain_image($goods['images']);
+        $goods['image'] = localpath_to_netpath($goods['image']);//主图
+        $goods['images'] = array_domain_image($goods['images']);//轮播图
+        $skuPrices      = list_domain_image($skuPrices->toArray(),['image']);//规格图
         $goods['sku_prices'] = $skuPrices;
         $goods['content'] = $content;
         unset($goods['new_sku_prices']);

+ 1 - 1
application/config.php

@@ -22,7 +22,7 @@ return [
     'app_debug'              => true,
     // 应用Trace
     'app_trace'              => Env::get('app.trace', false),
-    'app_trace'              => true,
+    'app_trace'              => false,
     // 应用模式状态
     'app_status'             => '',
     // 是否支持多模块