feat(CartList): 修改购物车商品价格计算逻辑

This commit is contained in:
mkm 2024-07-22 17:13:38 +08:00
parent 02aa52cd3f
commit 1f91bb1e0b

View File

@ -122,9 +122,9 @@ class CartList extends BaseAdminDataLists implements ListsSearchInterface, Lists
];
if ($this->user_ship == 0) {
if ($data['pay_price'] < 500) {
$data['msg'] = '还差' . bcsub(500, $this->activity_price, 2) . '即可获得10%的品牌礼品兑换券,可到线下门店兑换礼品。';
$data['msg'] = '还差' . bcsub(500, $data['pay_price'], 2) . '即可获得10%的品牌礼品兑换券,可到线下门店兑换礼品。';
} else {
$data['msg'] = '您已选购满500元支付成功后即可获得' . bcmul($this->activity_price, 0.1, 2) . '元品牌礼品兑换券,可到线下门店兑换礼品。';
$data['msg'] = '您已选购满500元支付成功后即可获得' . bcmul($data['pay_price'], 0.1, 2) . '元品牌礼品兑换券,可到线下门店兑换礼品。';
}
}
if ($this->off_activity == 1) { //1