修改取消活动价逻辑

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() public function extend()
{ {
$off_activity = Config::where('name', 'off_activity')->value('value'); $off_activity = Config::where('name', 'off_activity')->value('value');
if($off_activity==1){ // if($off_activity==1){
$data=[ // $data=[
'off_activity' => $off_activity, // 'off_activity' => $off_activity,
'price' => 'cost', // 'price' => 'cost',
'op_price' => 'price', // 'op_price' => 'price',
]; // ];
}else{ // }else{
$data=[ $data=[
'off_activity' => $off_activity, 'off_activity' => $off_activity,
'price' => 'price', 'price' => 'price',
'op_price' => 'price', 'op_price' => 'price',
]; ];
} // }
return $data; return $data;
} }
} }

View File

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