@ -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
$res = getJdGoodsBySku([$sku], 10048, 0, true);
@ -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",