lqmac 5 months ago
parent 88d431f54f
commit d24c6da609
  1. 12
      app/admin/controller/Goods.php
  2. 2
      app/store/controller/Goods.php
  3. 2
      app/store/model/Goods.php

@ -498,7 +498,19 @@ class Goods extends Controller
}
/**
* 商品抓取
* [collector description]
* @return [type] [description]
*/
public function collector(string $sku): Json{
$res = getJdGoodsBySku([$sku]);
// $collector = new \app\job\service\goods\Collector;
// $url = "https://item.jd.com/{$sku}.html";
// $res1 = $collector->collector($url, 10048);
return $this->renderSuccess($res[$sku] ?? []);
}

@ -369,7 +369,7 @@ class Goods extends Controller
* @return [type] [description]
*/
public function collector(string $sku): Json{
$res = getJdGoodsBySku([$sku], 10048, 0, true);
$res = getJdGoodsBySku([$sku]);
// $collector = new \app\job\service\goods\Collector;
// $url = "https://item.jd.com/{$sku}.html";
// $res1 = $collector->collector($url, 10048);

@ -383,7 +383,7 @@ class Goods extends GoodsModel
continue;
}
$inImage = [
'file_path' => $value['image'],
'file_path' => $value['preview_url'],
'store_id' => self::$storeId,
'merchant_id' => $data['merchant_id'] ?? 0,
'storage' => "external",

Loading…
Cancel
Save