Ver Fonte

销售时间

shish há 3 anos atrás
pai
commit
4634aa8be0
1 ficheiros alterados com 13 adições e 0 exclusões
  1. 13 0
      biz-ghs/product/classes/ProductClass.php

+ 13 - 0
biz-ghs/product/classes/ProductClass.php

@@ -153,6 +153,19 @@ class ProductClass extends BaseClass
             $smallPrice = bcmul($smallPrice, $smallRatio, 2);
             $list[$k]['smallPrice'] = $smallPrice;
 
+            $presellDate = $v['presellDate'] ?? '';
+            $presellDateList = [];
+            if (!empty($presellDate)) {
+                $dateArr = explode(',', trim($presellDate));
+                if (!empty($dateArr)) {
+                    foreach ($dateArr as $sellTime) {
+                        $sellDate = date("Y-m-d", $sellTime);
+                        $presellDateList[] = $sellDate;
+                    }
+                }
+            }
+            $list[$k]['presellDateList'] = $presellDateList;
+
             //这个很重要不能随意乱改
             $autoPrice = bcadd($v['cost'], $v['addPrice'], 2);
             $skMore = $v['skMore'] ?? 0;