From 3925ffbb83e28dca843f2afda0c3709ce3dbbb98 Mon Sep 17 00:00:00 2001 From: tpingzhang <635929049@qq.com> Date: Mon, 30 Sep 2019 10:49:13 +0800 Subject: [PATCH] =?UTF-8?q?1015=E7=89=88=E6=9C=AC=E5=9B=9E=E9=80=80?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Sdk/Controller/SpendController.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Application/Sdk/Controller/SpendController.class.php b/Application/Sdk/Controller/SpendController.class.php index b99ccb966..45e606255 100644 --- a/Application/Sdk/Controller/SpendController.class.php +++ b/Application/Sdk/Controller/SpendController.class.php @@ -62,16 +62,18 @@ class SpendController extends Controller { 'user_id' => $user_id, 'game_id' => $game_id ) )->getField ( 'bind_balance' ); - $data['price'] = 1; + // $data['price'] = 1; $this->assign ( 'balance', $balance ); $this->assign ( 'bind_balance', $bind_balance ); $this->assign ( 'data', $data ); $this->assign ( 'btncolor', $request ['btncolor'] ); - if ($balance + $bind_balance > $data['price']) + if ($balance + $bind_balance > $data['price']) { $this->assign ('pay_price', 0); // 是否第三方支付 - else - $this->assign ('pay_price', $data['price'] - $balance - $bind_balance); + } else { + $payPrice = $data['price'] - $balance - $bind_balance; + $this->assign ('pay_price', $payPrice ? $payPrice : 0); + } /* $this->assign ( 'alipayurl', $ret[0]['payURL']); header("Access-Control-Allow-Origin: *"); */