|
@@ -309,22 +309,22 @@ class ProductClass extends BaseClass
|
|
|
$smallPrice = bcmul($smallPrice, $smallRatio, 2);
|
|
$smallPrice = bcmul($smallPrice, $smallRatio, 2);
|
|
|
$list[$k]['smallPrice'] = $smallPrice;
|
|
$list[$k]['smallPrice'] = $smallPrice;
|
|
|
|
|
|
|
|
- $presellDate = $v['presellDate'] ?? '';
|
|
|
|
|
- $presellDateList = [];
|
|
|
|
|
- $presellDateShow = [];
|
|
|
|
|
- if (!empty($presellDate)) {
|
|
|
|
|
- $dateArr = explode(',', trim($presellDate));
|
|
|
|
|
|
|
+ $preSellDate = $v['presellDate'] ?? '';
|
|
|
|
|
+ $preSellDateList = [];
|
|
|
|
|
+ $preSellDateShow = [];
|
|
|
|
|
+ if (!empty($preSellDate)) {
|
|
|
|
|
+ $dateArr = explode(',', trim($preSellDate));
|
|
|
if (!empty($dateArr)) {
|
|
if (!empty($dateArr)) {
|
|
|
foreach ($dateArr as $sellTime) {
|
|
foreach ($dateArr as $sellTime) {
|
|
|
$sellDate = date("Y-m-d", $sellTime);
|
|
$sellDate = date("Y-m-d", $sellTime);
|
|
|
$showDate = date("n月j日", $sellTime);
|
|
$showDate = date("n月j日", $sellTime);
|
|
|
- $presellDateList[] = $sellDate;
|
|
|
|
|
- $presellDateShow[] = $showDate;
|
|
|
|
|
|
|
+ $preSellDateList[] = $sellDate;
|
|
|
|
|
+ $preSellDateShow[] = $showDate;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- $list[$k]['presellDateList'] = $presellDateList;
|
|
|
|
|
- $list[$k]['presellDateShow'] = $presellDateShow;
|
|
|
|
|
|
|
+ $list[$k]['presellDateList'] = $preSellDateList;
|
|
|
|
|
+ $list[$k]['presellDateShow'] = $preSellDateShow;
|
|
|
|
|
|
|
|
//这个很重要不能随意乱改
|
|
//这个很重要不能随意乱改
|
|
|
$autoPrice = bcadd($v['cost'], $v['addPrice'], 2);
|
|
$autoPrice = bcadd($v['cost'], $v['addPrice'], 2);
|
|
@@ -358,6 +358,7 @@ class ProductClass extends BaseClass
|
|
|
$ratio = isset($v['ratio']) && $v['ratio'] > 0 ? $v['ratio'] : 1;
|
|
$ratio = isset($v['ratio']) && $v['ratio'] > 0 ? $v['ratio'] : 1;
|
|
|
$list[$k]['cover'] = $cover;
|
|
$list[$k]['cover'] = $cover;
|
|
|
$list[$k]['prePrice'] = $v['price'] ?? 0;
|
|
$list[$k]['prePrice'] = $v['price'] ?? 0;
|
|
|
|
|
+ $list[$k]['itemName'] = $v['name'] ?? '';
|
|
|
|
|
|
|
|
//今日特价、会员价
|
|
//今日特价、会员价
|
|
|
$price = self::getFinalPrice($v, $level, $priceMap, $addPriceMap);
|
|
$price = self::getFinalPrice($v, $level, $priceMap, $addPriceMap);
|
|
@@ -381,22 +382,18 @@ class ProductClass extends BaseClass
|
|
|
$smallPrice = bcmul($smallPrice, $smallRatio, 2);
|
|
$smallPrice = bcmul($smallPrice, $smallRatio, 2);
|
|
|
$list[$k]['smallPrice'] = $smallPrice;
|
|
$list[$k]['smallPrice'] = $smallPrice;
|
|
|
|
|
|
|
|
- $presellDate = $v['presellDate'] ?? '';
|
|
|
|
|
- $presellDateList = [];
|
|
|
|
|
- $presellDateShow = [];
|
|
|
|
|
- if (!empty($presellDate)) {
|
|
|
|
|
- $dateArr = explode(',', trim($presellDate));
|
|
|
|
|
|
|
+ $preSellDate = $v['presellDate'] ?? '';
|
|
|
|
|
+ $preSellDateShow = [];
|
|
|
|
|
+ if (!empty($preSellDate)) {
|
|
|
|
|
+ $dateArr = explode(',', trim($preSellDate));
|
|
|
if (!empty($dateArr)) {
|
|
if (!empty($dateArr)) {
|
|
|
foreach ($dateArr as $sellTime) {
|
|
foreach ($dateArr as $sellTime) {
|
|
|
- $sellDate = date("Y-m-d", $sellTime);
|
|
|
|
|
$showDate = date("n月j日", $sellTime);
|
|
$showDate = date("n月j日", $sellTime);
|
|
|
- $presellDateList[] = $sellDate;
|
|
|
|
|
- $presellDateShow[] = $showDate;
|
|
|
|
|
|
|
+ $preSellDateShow[] = $showDate;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- $list[$k]['presellDateList'] = $presellDateList;
|
|
|
|
|
- $list[$k]['presellDateShow'] = $presellDateShow;
|
|
|
|
|
|
|
+ $list[$k]['presellDateShow'] = $preSellDateShow;
|
|
|
}
|
|
}
|
|
|
return $list;
|
|
return $list;
|
|
|
}
|
|
}
|