|
|
@@ -311,25 +311,29 @@ class StoreProduct extends BaseModel
|
|
|
@file_put_contents('quanju.txt', json_encode($isSingle) . "-是不是数组\r\n", 8);
|
|
|
if ($isSingle) {
|
|
|
@file_put_contents('quanju.txt', json_encode($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) {
|
|
|
$list['vip_price'] = isset($list['price']) ? bcsub($list['price'], bcmul($discount, $list['price'], 2), 2) : 0;
|
|
|
+ }else{
|
|
|
+ $list['vip_price'] = isset($list['price']) ? bcsub($list['price'], bcmul(100, $list['price'], 2), 2) : 0;
|
|
|
}
|
|
|
- } else {
|
|
|
- $list['vip_price'] = isset($list['price']) ? bcsub($list['price'], bcmul(100, $list['price'], 2), 2) : 0;
|
|
|
- }
|
|
|
+// } else {
|
|
|
+// $list['vip_price'] = isset($list['price']) ? bcsub($list['price'], bcmul(100, $list['price'], 2), 2) : 0;
|
|
|
+// }
|
|
|
|
|
|
} else {
|
|
|
@file_put_contents('quanju.txt', json_encode($list) . "-是数组\r\n", 8);
|
|
|
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) {
|
|
|
// @file_put_contents('quanju.txt', json_encode($item)."-5\r\n", 8);
|
|
|
$item['vip_price'] = isset($item['price']) ? bcsub($item['price'], bcmul($discount, $item['price'], 2), 2) : 0;
|
|
|
+ }else{
|
|
|
+ $item['vip_price'] = isset($item['price']) ? bcsub($item['price'], bcmul(100, $item['price'], 2), 2) : 0;
|
|
|
}
|
|
|
- } else {
|
|
|
- $item['vip_price'] = isset($item['price']) ? bcsub($item['price'], bcmul(100, $item['price'], 2), 2) : 0;
|
|
|
- }
|
|
|
+// } else {
|
|
|
+// $item['vip_price'] = isset($item['price']) ? bcsub($item['price'], bcmul(100, $item['price'], 2), 2) : 0;
|
|
|
+// }
|
|
|
}
|
|
|
}
|
|
|
|