From 49ea0d3fd395a2a72d2308bb95bd3fd1f8b7fc3e Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 10 Dec 2021 13:26:15 +0800 Subject: [PATCH] 1 --- webapp/controller/UserController.class.php | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index 5ebf369..846ecf5 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -326,4 +326,43 @@ class UserController extends BaseAuthedController { )); } + public function detailInfo() + { + $targetId = getReqVal('target_id', ''); + $userDb = SqlHelper::ormSelectOne + ($this->_getMysql($targetId), + 't_user', + array( + 'account_id' => $targetId + ) + ); + if (!$userDb) { + $this->_rspErr(1, '账号不存在'); + return; + } + $userDto = User::info($userDb); + $userDto['current_rank'] = 1; + $userDto['history_best_rank'] = 1; + $userDto['history_seasons'] = array( + array( + 'season_id' => 0, + 'total_kills' => 0, + 'game_times' => 0, + 'win_times' => 0, + 'win_rate' => 0, + 'max_kills' => 0, + 'avg_kills' => 0, + 'max_damage_out' => 0, + 'avg_damage_out' => 0, + 'star_kills' => 0, + 'star_damage' => 0, + 'star_alive' => 0, + 'star_recover' => 0, + 'star_win' => 0, + ) + ); + $this->_rspData(array( + 'info' => $userDto + )); + } }