|
@@ -358,7 +358,8 @@ class Index extends Api
|
|
|
}
|
|
|
if ($user_coupon_info['type'] == 1) {
|
|
|
//打折券
|
|
|
- $price = number_format($info['price'] * $user_coupon_info['money'] / 100, 2, '.', '');
|
|
|
+ $coupon_price = number_format($info['price'] * (100 - $user_coupon_info['money']) / 100, 2, '.', '');
|
|
|
+ $price = number_format($info['price'] - $coupon_price, 2, '.', '');
|
|
|
} else {
|
|
|
//抵扣券
|
|
|
$price = number_format($info['price'] - $user_coupon_info['money'], 2, '.', '');
|
|
@@ -374,7 +375,8 @@ class Index extends Api
|
|
|
if ($v['coupon_id']) { //使用优惠券
|
|
|
if ($user_coupon_info['type'] == 1) {
|
|
|
//打折券
|
|
|
- $price = number_format($vipprice * $user_coupon_info['money'] / 100, 2, '.', '');
|
|
|
+ $coupon_price = number_format($vipprice * (100 - $user_coupon_info['money']) / 100, 2, '.', '');
|
|
|
+ $price = number_format($vipprice - $coupon_price, 2, '.', '');
|
|
|
} else {
|
|
|
//抵扣券
|
|
|
$price = number_format($vipprice - $user_coupon_info['money'], 2, '.', '');
|