From 74f44e72f173f5e3e7520e66f48bcb4101838030 Mon Sep 17 00:00:00 2001 From: yangduo Date: Fri, 3 Jan 2025 10:48:56 +0800 Subject: [PATCH] recharge activity --- .../controller/RechargeController.class.php | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/webapp/controller/RechargeController.class.php b/webapp/controller/RechargeController.class.php index a08b99e..6ce555f 100644 --- a/webapp/controller/RechargeController.class.php +++ b/webapp/controller/RechargeController.class.php @@ -213,4 +213,36 @@ class RechargeController 'diamond_present' => $diamond_present )); } + + public function activityInfo() + { + $account_id = $_REQUEST['account_id']; + //登录校验 + $login = loginVerify($account_id, $_REQUEST['session_id']); + if (!$login) { + phpcommon\sendError(ERR_USER_BASE + 1, 'session无效'); + return; + } + $conn = $this->getMysql($account_id); + if (!$conn) { + phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家'); + return; + } + + $rechargerow = $conn->execQueryOne( + 'SELECT * FROM recharge WHERE accountid=:accountid;', + array( + ':accountid' => $account_id + ) + ); + + $firstrecharge = ''; + if ($rechargerow) { + $firstrecharge = $rechargerow['first_data']; + } + + echo json_encode(array( + 'first_recharge' => $firstrecharge, + )); + } }