shish 6 лет назад
Родитель
Сommit
658ac8da80
2 измененных файлов с 2 добавлено и 4 удалено
  1. 0 2
      biz/goods/classes/GoodsClass.php
  2. 2 2
      biz/goods/services/GoodsCategoryService.php

+ 0 - 2
biz/goods/classes/GoodsClass.php

@@ -36,9 +36,7 @@ class GoodsClass extends BaseClass
 		$merchantIdList = array_column($list, 'merchantId');
 		$merchantIdList = array_unique(array_filter($merchantIdList));
 		$merchantList = MerchantService::getByIds($merchantIdList, null, 'id');
-		echo '<pre>';print_r($list);
 		foreach ($list as $key => $val) {
-			dd($val);
 			$id = $val['id'];
 			//大中小图片转化
 			$val = business::formatGoodsImg($val);

+ 2 - 2
biz/goods/services/GoodsCategoryService.php

@@ -22,7 +22,7 @@ class GoodsCategoryService extends BaseService
 			return $data;
 		}
 		$ids = array_column($list, 'gId');
-		$list = GoodsService::getAllByCondition(['id' => ['in', $ids]], 'inTurn DESC', 'goodsName,shopImg,price,sold,id,createTime,status,inTurn');
+		$list = GoodsService::getAllByCondition(['id' => ['in', $ids]], 'inTurn DESC', '*');
 		$data['list'] = GoodsClass::groupGoodsBaseInfo($list);
 		return $data;
 	}
@@ -47,7 +47,7 @@ class GoodsCategoryService extends BaseService
 			$categoryGoods[$cId][] = $val['gId'];
 		}
 		//查出商品信息
-		$goodsInfoList = GoodsService::getAllByCondition(['id' => ['in', $goodsList]], 'inTurn DESC', 'goodsName,shopImg,price,sold,id', 'id');
+		$goodsInfoList = GoodsService::getAllByCondition(['id' => ['in', $goodsList]], 'inTurn DESC', '*', 'id');
 		$goodsInfoList = GoodsClass::groupGoodsBaseInfo($goodsInfoList);
 		
 		//每个分类取的商品数