修改取消活动价逻辑

This commit is contained in:
liu 2024-07-05 15:28:57 +08:00
parent a8f68ff099
commit 406fa2831b
2 changed files with 12 additions and 12 deletions

View File

@ -117,19 +117,19 @@ class ProductLists extends BaseAdminDataLists implements ListsSearchInterface, L
public function extend()
{
$off_activity = Config::where('name', 'off_activity')->value('value');
if($off_activity==1){
$data=[
'off_activity' => $off_activity,
'price' => 'cost',
'op_price' => 'price',
];
}else{
// if($off_activity==1){
// $data=[
// 'off_activity' => $off_activity,
// 'price' => 'cost',
// 'op_price' => 'price',
// ];
// }else{
$data=[
'off_activity' => $off_activity,
'price' => 'price',
'op_price' => 'price',
];
}
// }
return $data;
}
}

View File

@ -91,11 +91,11 @@ class OrderLogic extends BaseLogic
}
unset($cart_select[$k]['id']);
$cart_select[$k]['total_price'] = bcmul($v['cart_num'], $find['price'], 2); //订单总价
if ($off_activity == 1) {
$price = $find['cost'];
} else {
// if ($off_activity == 1) {
// $price = $find['cost'];
// } else {
$price = $find['price'];
}
// }
$cart_select[$k]['price'] = $price;
$cart_select[$k]['cost'] = $find['cost'];
$cart_select[$k]['vip'] = 0;