This commit is contained in:
aozhiwei 2021-12-07 16:17:04 +08:00
parent cd885b85d6
commit 256b236b91

View File

@ -2,6 +2,11 @@
namespace models; namespace models;
require_once('mt/Item.php');
use mt;
use phpcommon\SqlHelper;
class User extends BaseModel { class User extends BaseModel {
public static function show($row) public static function show($row)
@ -65,8 +70,19 @@ class User extends BaseModel {
private static function getHeadList($userInfo) private static function getHeadList($userInfo)
{ {
$headList = emptyReplace(json_decode($userInfo['head_list'], true), array()); $headList = emptyReplace(json_decode($userInfo['head_list'], true), array());
$heroList = array(); $rows = SqlHelper::ormSelect(
$heroSkinList = array(); myself()->_getSelfMysql(),
't_hero',
array(
'account_id' => $userInfo['account_id'],
)
);
foreach ($rows as $row) {
$itemMeta = mt\Item::get($row['hero_id']);
if ($itemMeta && $itemMeta['hero_head']) {
array_push($headList, $itemMeta['hero_head']);
}
}
return $headList; return $headList;
} }