This commit is contained in:
hujiabin 2024-03-13 15:14:43 +08:00
parent b6ea2736cf
commit 8b90fe7e5a

View File

@ -37,8 +37,13 @@ class HeroController extends BaseAuthedController {
public function heroList() public function heroList()
{ {
$heroList = array(); $heroList = array();
Hero::getHeroList(function ($row) use(&$heroList) { $userDb = myself()->_getOrmUserInfo();
Hero::getHeroList(function ($row) use(&$heroList,$userDb) {
$row['hero_uniid'] = $row['idx']; $row['hero_uniid'] = $row['idx'];
$row['is_select'] = 0;
if ($row['idx'] == $userDb['hero_id']){
$row['is_select'] = 1;
}
array_push($heroList, $row); array_push($heroList, $row);
}); });
$this->_rspData(array( $this->_rspData(array(