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, + )); + } }