|
@@ -308,7 +308,9 @@ class StoreProduct extends BaseModel
|
|
|
else
|
|
else
|
|
|
return $isSingle ? $list : 0;
|
|
return $isSingle ? $list : 0;
|
|
|
//当$list为数组时$isSingle==true为一维数组 ,否则为二维
|
|
//当$list为数组时$isSingle==true为一维数组 ,否则为二维
|
|
|
|
|
+ @file_put_contents('quanju.txt', json_encode($isSingle) . "-是不是数组\r\n", 8);
|
|
|
if ($isSingle) {
|
|
if ($isSingle) {
|
|
|
|
|
+ @file_put_contents('quanju.txt', $list . "-不是数组\r\n", 8);
|
|
|
if (!empty($list['is_inclusive']) && !empty($list['is_points']) && !empty($list['is_explosive'])) {
|
|
if (!empty($list['is_inclusive']) && !empty($list['is_points']) && !empty($list['is_explosive'])) {
|
|
|
if ($list['is_inclusive'] == 0 && $list['is_points'] == 0 && $list['is_explosive'] == 0) {
|
|
if ($list['is_inclusive'] == 0 && $list['is_points'] == 0 && $list['is_explosive'] == 0) {
|
|
|
$list['vip_price'] = isset($list['price']) ? bcsub($list['price'], bcmul($discount, $list['price'], 2), 2) : 0;
|
|
$list['vip_price'] = isset($list['price']) ? bcsub($list['price'], bcmul($discount, $list['price'], 2), 2) : 0;
|
|
@@ -318,6 +320,7 @@ class StoreProduct extends BaseModel
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ @file_put_contents('quanju.txt', json_encode($list) . "-是数组\r\n", 8);
|
|
|
foreach ($list as &$item) {
|
|
foreach ($list as &$item) {
|
|
|
if (!empty($list['is_inclusive']) && !empty($list['is_points']) && !empty($list['is_explosive'])) {
|
|
if (!empty($list['is_inclusive']) && !empty($list['is_points']) && !empty($list['is_explosive'])) {
|
|
|
if ($item['is_inclusive'] == 0 && $item['is_points'] == 0 && $item['is_explosive'] == 0) {
|
|
if ($item['is_inclusive'] == 0 && $item['is_points'] == 0 && $item['is_explosive'] == 0) {
|