|
|
@@ -99,6 +99,8 @@ class MtController extends PublicController
|
|
|
|
|
|
$goodsName = $goodsInfo['data']['name'] ?? '';
|
|
|
$goodsPrice = $goodsInfo['data']['price'] ?? '';
|
|
|
+ $description = $goodsInfo['data']['description'] ?? '';
|
|
|
+ $sh = strstr($description, '【鲜花】') !== false ? 1 : 0;
|
|
|
|
|
|
$shopImg = [];
|
|
|
$cover = '';
|
|
|
@@ -128,6 +130,7 @@ class MtController extends PublicController
|
|
|
'catIds' => $catIds,
|
|
|
'cover' => $cover,
|
|
|
'spu' => $appSpuCode,
|
|
|
+ 'sh' => $sh,
|
|
|
];
|
|
|
GoodsClass::addGoods($addData);
|
|
|
$transaction->commit();
|
|
|
@@ -264,6 +267,8 @@ class MtController extends PublicController
|
|
|
|
|
|
$goodsName = $goodsInfo['data']['name'] ?? '';
|
|
|
$goodsPrice = $goodsInfo['data']['price'] ?? '';
|
|
|
+ $description = $goodsInfo['data']['description'] ?? '';
|
|
|
+ $sh = strstr($description, '【鲜花】') !== false ? 1 : 0;
|
|
|
|
|
|
$shopImg = [];
|
|
|
$cover = '';
|
|
|
@@ -280,6 +285,7 @@ class MtController extends PublicController
|
|
|
$hasGoods->price = $goodsPrice;
|
|
|
$hasGoods->name = $goodsName;
|
|
|
$hasGoods->cover = $cover;
|
|
|
+ $hasGoods->sh = $sh;
|
|
|
$hasGoods->shopImg = json_encode($shopImg);
|
|
|
$hasGoods->save();
|
|
|
|