This commit is contained in:
hujiabin 2024-08-09 12:02:15 +08:00
parent c94fe3f396
commit 9c35f1e244

View File

@ -122,11 +122,13 @@ class RankingController extends BaseAuthedController {
private function _extractUserInfo($row){
if ($row){
$hero_id = 0;
$hero_skin = 0;
$heroDb = Hero::findByAccountId($row['account_id'],$row['hero_id']);
if ($heroDb){
$hero_id = $heroDb['hero_id'];
$skinDb = HeroSkin::findByAccountId($row['account_id'],$heroDb['skin_id']);
$hero_skin = $skinDb ? $skinDb['skin_id']:0;
}
@ -138,7 +140,7 @@ class RankingController extends BaseAuthedController {
'head_id' => $row['head_id'],
'head_frame' => $row['head_frame'],
'hero_skin' => $hero_skin,
'hero_id' => $row['hero_id'],
'hero_id' => $hero_id,
);
}else{
$info = array();