From e2541117b00da4fd50875847344a8904c9bcd50e Mon Sep 17 00:00:00 2001 From: tpingzhang <635929049@qq.com> Date: Thu, 21 Nov 2019 21:26:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AA=E4=B8=8A=E4=BC=A0=E8=A7=92=E8=89=B2?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E5=85=81=E8=AE=B8=E5=85=85=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sdk/Controller/ExchangeController.class.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Application/Sdk/Controller/ExchangeController.class.php b/Application/Sdk/Controller/ExchangeController.class.php index 3c3f3ce9..1ffdc840 100644 --- a/Application/Sdk/Controller/ExchangeController.class.php +++ b/Application/Sdk/Controller/ExchangeController.class.php @@ -30,6 +30,16 @@ class ExchangeController extends BaseController{ $request = json_decode(base64_decode(file_get_contents("php://input")),true); $request = SafeFilter($request); + + $role = M("user_play_info", "tab_")->where([ + 'user_id' => $request['user_id'], + 'game_id' => $request['game_id'], + 'server_id' => $request['server_id'] + ])->find(); + if (!$role || !$role['role_id']) { + $this->set_message(0,"fail","未上传角色,不允许充值"); + } + M("pay_info", "tab_")->add([ 'user_id' => $request['user_id'], 'game_id' => $request['game_id'],