|
|
@@ -5,6 +5,7 @@ namespace bizMall\goods\classes;
|
|
|
use bizMall\goods\services\GoodsCategoryService;
|
|
|
use bizMall\merchant\services\MerchantService;
|
|
|
use common\components\business;
|
|
|
+use common\components\imgUtil;
|
|
|
use common\components\stringUtil;
|
|
|
use common\components\util;
|
|
|
use Yii;
|
|
|
@@ -24,7 +25,6 @@ class GoodsClass extends BaseClass
|
|
|
}
|
|
|
$list = self::groupGoodsBaseInfo([$info]);
|
|
|
$info = current($list);
|
|
|
- //商品的分类
|
|
|
$category = GoodsCategoryService::getGoodsHasCategoryIds($id);
|
|
|
$info['categoryIdList'] = $category;
|
|
|
return $info;
|
|
|
@@ -41,13 +41,12 @@ class GoodsClass extends BaseClass
|
|
|
$rise = GoodsSettingClass::getRise($sjId);
|
|
|
|
|
|
foreach ($list as $key => $val) {
|
|
|
- $id = $val['id'];
|
|
|
//大中小图片转化
|
|
|
$val = business::formatGoodsImg($val);
|
|
|
//免费配送范围
|
|
|
$val['freeSendDist'] = 5;
|
|
|
//多款式
|
|
|
- $val['goodsStyleList'] = isset($val['goodsStyle']) && $val['goodsStyle'] == 1 ? GoodsStyleClass::getStyleList($id) : [];
|
|
|
+ $val['goodsStyleList'] = [];
|
|
|
$val['createDate'] = date("Y-m-d", strtotime($val['createTime']));
|
|
|
//节日涨价
|
|
|
if (!empty($rise)) {
|
|
|
@@ -63,6 +62,9 @@ class GoodsClass extends BaseClass
|
|
|
//临时加100块
|
|
|
//$price = $val['price'];
|
|
|
//$val['price'] = $price + 100;
|
|
|
+ $shortCover = $val['cover'] ?? '';
|
|
|
+ $val['cover'] = imgUtil::groupImg($shortCover);
|
|
|
+ $val['shortCover'] = $shortCover;
|
|
|
$list[$key] = $val;
|
|
|
}
|
|
|
return $list;
|