From 28937dd832c3d07aa870cff98fc4436d914eb586 Mon Sep 17 00:00:00 2001 From: tpingzhang <635929049@qq.com> Date: Tue, 8 Oct 2019 09:24:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E6=94=AF=E4=BB=98=E6=98=BE=E7=A4=BA=E5=AE=89=E5=8D=93?= =?UTF-8?q?=20save=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sdk/Controller/UserController.class.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Application/Sdk/Controller/UserController.class.php b/Application/Sdk/Controller/UserController.class.php index 61c119ab2..103277845 100644 --- a/Application/Sdk/Controller/UserController.class.php +++ b/Application/Sdk/Controller/UserController.class.php @@ -1774,6 +1774,15 @@ class UserController extends BaseController if (isset($r['shortcut']) && $r['shortcut'] == 1) $shortcut_pay = 1; } + // 双乾微信小程序支付 + $wx_small = 0; + $sqpay = M('tool','tab_')->field('status, config')->where(array('name'=>'sqpay'))->find(); + if ($sqpay['status'] == 1) { + $r = json_decode($sqpay['config'], true); + if (isset($r['wx_small']) && $r['wx_small'] == 1) + $wx_small = 1; + } + $user_id = $request['user_id']; $game_id = $request['game_id']; $balance = M ('user', 'tab_')->where (array( @@ -1799,8 +1808,8 @@ class UserController extends BaseController 'squnion_pay' => $squnion_pay, // 银联0关 1开 'platform_coin' => $balance, 'bind_coin' => $bind_balance, - 'wx_type' => 0, // 0微信 1 微信小程序 双乾 - 'shortcut_pay' => 0, // 快捷支付 0关 1开 + 'wx_type' => $wx_small, // 0微信 1 微信小程序 双乾 + 'shortcut_pay' => $shortcut_pay, // 快捷支付 0关 1开 ))); } @@ -2015,10 +2024,8 @@ class UserController extends BaseController } $return = M('User', 'tab_') -> where($map) -> save($data); - if (!$return) { - + if ($return === false) { $this -> set_message(1070, "fail", "用户数据更新失败"); - } $data['status'] = 200; echo base64_encode(json_encode($data)); From 755705360414922dd7300d22a7e19abe8efdfd0a Mon Sep 17 00:00:00 2001 From: tpingzhang <635929049@qq.com> Date: Tue, 8 Oct 2019 09:26:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B8=B8=E6=88=8F=20=E5=9B=9E=E8=B0=83?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Common/Api/GameApi.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Application/Common/Api/GameApi.class.php b/Application/Common/Api/GameApi.class.php index 3a6c71b27..e2584ef09 100644 --- a/Application/Common/Api/GameApi.class.php +++ b/Application/Common/Api/GameApi.class.php @@ -11,6 +11,7 @@ namespace Common\Api; use Org\UcenterSDK\Ucservice; +use Think\Log; class GameApi { public function game_login(){ @@ -18,6 +19,7 @@ class GameApi { } public function game_pay_notify($param=null,$code=1,$is_uc=0){ + Log::write("notice:".serialize($param), Log::DEBUG); $pay_map['pay_status'] = 1; $pay_map['pay_game_status'] = 0; if($is_uc){