|
|
@@ -32,15 +32,23 @@ class ProductService extends BaseService
|
|
|
$preSellItem = [];
|
|
|
if ($itemInfoData) {
|
|
|
foreach ($itemInfoData as $v) {
|
|
|
+ $one = $v;
|
|
|
+ $two = $v;
|
|
|
if (isset($v['presell']) && $v['presell'] == 1) {
|
|
|
- $v['classId'] = self::PRESELL_CLASS_ID;
|
|
|
- $preSellItem[] = $v;
|
|
|
- $v['className'] = '预售专区';
|
|
|
+ $one['classId'] = self::PRESELL_CLASS_ID;
|
|
|
+ unset($one['py']);
|
|
|
+ $preSellItem[] = $one;
|
|
|
+
|
|
|
+ $two['classId'] = self::PRESELL_CLASS_ID;;
|
|
|
+ $two['className'] = '预售专区';
|
|
|
$itemGroup[] = $v;
|
|
|
} elseif (isset($v['discountPrice']) && $v['discountPrice'] > 0) {
|
|
|
- $v['classId'] = self::TJ_CLASS_ID;
|
|
|
- $tjItem[] = $v;
|
|
|
- $v['className'] = '今日特价';
|
|
|
+ $one['classId'] = self::TJ_CLASS_ID;
|
|
|
+ unset($one['py']);
|
|
|
+ $tjItem[] = $one;
|
|
|
+
|
|
|
+ $two['classId'] = self::TJ_CLASS_ID;;
|
|
|
+ $two['className'] = '今日特价';
|
|
|
$itemGroup[] = $v;
|
|
|
}
|
|
|
}
|
|
|
@@ -74,7 +82,11 @@ class ProductService extends BaseService
|
|
|
//冗余给前端使用 2021.1.31 lqh
|
|
|
$v['classId'] = $classId;
|
|
|
$v['print'] = $print;
|
|
|
- $tmp['child'][] = $v;
|
|
|
+
|
|
|
+ $one = $v;
|
|
|
+ unset($one['py']);
|
|
|
+ $tmp['child'][] = $one;
|
|
|
+
|
|
|
$v['className'] = $className;
|
|
|
$itemGroup[] = $v;
|
|
|
}
|