|
@@ -313,7 +313,7 @@ class Index extends Api
|
|
|
}
|
|
|
$discount = $vip_info['vipdiscount'];
|
|
|
}
|
|
|
- $vipprice = $info['price'] * $discount / 100; //会员价
|
|
|
+ $vipprice = number_format($info['price'] * $discount / 100, 2, '.', ''); //会员价
|
|
|
//查询优惠券
|
|
|
if ($v['coupon_id']) {
|
|
|
$user_coupon_info = $user_coupon->where(['id' => $v['coupon_id'], 'user_id' => $this->auth->id])->find();
|
|
@@ -358,10 +358,10 @@ class Index extends Api
|
|
|
}
|
|
|
if ($user_coupon_info['type'] == 1) {
|
|
|
//打折券
|
|
|
- $price = $info['price'] * $user_coupon_info['money'] / 100;
|
|
|
+ $price = number_format($info['price'] * $user_coupon_info['money'] / 100, 2, '.', '');
|
|
|
} else {
|
|
|
//抵扣券
|
|
|
- $price = $info['price'] - $user_coupon_info['money'];
|
|
|
+ $price = number_format($info['price'] - $user_coupon_info['money'], 2, '.', '');
|
|
|
}
|
|
|
} else {
|
|
|
$price = $vipprice;
|
|
@@ -374,10 +374,10 @@ class Index extends Api
|
|
|
if ($v['coupon_id']) { //使用优惠券
|
|
|
if ($user_coupon_info['type'] == 1) {
|
|
|
//打折券
|
|
|
- $price = $vipprice * $user_coupon_info['money'] / 100;
|
|
|
+ $price = number_format($vipprice * $user_coupon_info['money'] / 100, 2, '.', '');
|
|
|
} else {
|
|
|
//抵扣券
|
|
|
- $price = $vipprice - $user_coupon_info['money'];
|
|
|
+ $price = number_format($vipprice - $user_coupon_info['money'], 2, '.', '');
|
|
|
}
|
|
|
} else {
|
|
|
$price = $vipprice;
|