From 0975d670b21ee9ab4704600ac30c8bba6cc72aec Mon Sep 17 00:00:00 2001 From: tpingzhang <635929049@qq.com> Date: Thu, 21 Nov 2019 21:45:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=AE=E7=82=B9=E6=95=B0=20=E5=9B=9B?= =?UTF-8?q?=E8=88=8D=E4=BA=94=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Sdk/Controller/SpendController.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Application/Sdk/Controller/SpendController.class.php b/Application/Sdk/Controller/SpendController.class.php index 71cb9e57..3a0b9628 100644 --- a/Application/Sdk/Controller/SpendController.class.php +++ b/Application/Sdk/Controller/SpendController.class.php @@ -83,12 +83,13 @@ class SpendController extends Controller { $this->assign ( 'bind_balance', $bind_balance ); $this->assign ( 'data', $data ); $this->assign ( 'btncolor', $request ['btncolor'] ); + if ($balance + $bind_balance > $data['price']) { $apply_money = $data['price']; $this->assign ('pay_price', 0); // 是否第三方支付 } else { $apply_money = $balance + $bind_balance; - $payPrice = $data['price'] - $balance - $bind_balance; + $payPrice = round($data['price'] - $balance - $bind_balance, 2); $this->assign ('pay_price', $payPrice ? $payPrice : 0); }