|
|
@@ -127,7 +127,7 @@ class MtController extends PublicController
|
|
|
$imgString = $mgGoodsDetail['data']['picture'];
|
|
|
|
|
|
//$imgString = 'https://awp-assets.meituan.net/set/online_b_open_developer_react/images/biz-retail-bb948ac2b3.png,https://awp-assets.meituan.net/set/online_b_open_developer_react/images/biz-medicine-b6d2fdf744.png';
|
|
|
-echo $imgString;
|
|
|
+
|
|
|
$goodsName = $mtGoods['food_name'] ?? '';
|
|
|
$goodsPrice = $mtGoods['price'] ?? 0;
|
|
|
$num = $mtGoods['quantity'] ?? 0;
|
|
|
@@ -140,12 +140,11 @@ echo $imgString;
|
|
|
$shortUrl = httpUtil::downloadRemoteImg($sjId, $shopId, $imgUrl);
|
|
|
$shopImg[] = $shortUrl;
|
|
|
}
|
|
|
- echo $mtGoodsSpu.' ';
|
|
|
- print_r($shopImg);
|
|
|
$goodsData = [
|
|
|
'spu' => $mtGoodsSpu, 'shopImg' => $shopImg,
|
|
|
'name' => $goodsName, 'sjId' => $sjId, 'mainId' => $mainId, 'shopId' => $shopId, 'catId' => $catId, 'cover' => 0, 'unitGoodsPrice' => $goodsPrice, 'num' => $num,
|
|
|
];
|
|
|
+ print_r($goodsData);die;
|
|
|
$goods = GoodsClass::orderCreateGoods($goodsData);
|
|
|
|
|
|
Yii::$app->redis->executeCommand('SET', ['mt_goods_spu_' . $mtGoodsSpu, md5($imgString)]);
|