feat(CartList): 修改购物车API,根据满减活动调整支付价格和提示信息
This commit is contained in:
parent
2c2baf4135
commit
42f4e3d1d3
@ -122,15 +122,14 @@ class CartList extends BaseAdminDataLists implements ListsSearchInterface, Lists
|
|||||||
$data= [
|
$data= [
|
||||||
'off_activity' => $this->off_activity,
|
'off_activity' => $this->off_activity,
|
||||||
'total_price' => $this->total_price,
|
'total_price' => $this->total_price,
|
||||||
'activity_price' => $this->activity_price,
|
|
||||||
'msg' => '',
|
'msg' => '',
|
||||||
'pay_price' => bcsub($this->total_price, $this->activity_price, 2)
|
'pay_price' => bcsub($this->total_price, $this->activity_price, 2)
|
||||||
];
|
];
|
||||||
if($this->off_activity==1){
|
if($this->off_activity==1){
|
||||||
$data['pay_price']=$this->activity_price;
|
$data['pay_price']=$this->activity_price;
|
||||||
if($this->total_price<500){
|
if($this->total_price<500){
|
||||||
$data['msg']='还差'.bcsub(500,$this->total_price,2).'元可参与满减活动';
|
$data['msg']='还差'.bcsub(500,$this->total_price,2).'元可获得10%品牌礼品券';
|
||||||
$data['pay_price']= $this->total_price;
|
$data['pay_price']= $this->activity_price;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $data;
|
return $data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user