diff --git a/doc/_common.py b/doc/_common.py index 8a78b6e9..bab3f904 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -527,6 +527,7 @@ class NftDetail(object): ['type', '', 'nft类型 1:英雄 2:枪支 3:芯片 4:盲盒'], ['image', '', 'nft图片地址'], ['state', 0, '0:正常状态 1:出售中 2:出租中'], + ['lock_time', 0, '锁定时间(单位秒)'], ['hide_attr', 0, '是否隐藏属性'], ['is_genesis', 0, '是否创世nft'], ['info', Union([ diff --git a/webapp/models/Nft.php b/webapp/models/Nft.php index 62383a45..9f5630f1 100644 --- a/webapp/models/Nft.php +++ b/webapp/models/Nft.php @@ -106,11 +106,14 @@ class Nft extends BaseModel { } $tags = self::parseTags($nftDb['tags']); $image = 'https://www.cebg.games/res/avatars/' . $itemMeta['id'] . '.png'; + $full_image = 'https://www.cebg.games/res/avatars/full_' . $itemMeta['id'] . '.png'; if (in_array(self::GENESIS_TAG, $tags)) { $image = 'https://www.cebg.games/res/avatars/' . $itemMeta['id'] . '_1' . '.png'; + $full_image = 'https://www.cebg.games/res/avatars/full_' . $itemMeta['id'] . '_1' . '.png'; } if ($nftDb['token_type'] == self::CHIP_TYPE) { $image = 'https://www.cebg.games/res/avatars/' . $itemMeta['id'] . '_a' . '.png'; + $full_image = 'https://www.cebg.games/res/avatars/full_' . $itemMeta['id'] . '_a' . '.png'; } $nft = array( 'token_id' => $nftDb['token_id'], @@ -119,9 +122,11 @@ class Nft extends BaseModel { 'item_id' => $nftDb['item_id'], 'type' => $nftDb['token_type'], 'state' => $nftDb['token_state'], + 'lock_time' => 0, 'hide_attr' => 0, 'is_genesis' => in_array(self::GENESIS_TAG, $tags), 'image' => $image, + 'full_image' => $full_image, 'currency_list' => array(), 'transaction_recrod' => array(), 'info' => array( @@ -156,6 +161,7 @@ class Nft extends BaseModel { 'equpMeta' => $equipMeta, 'nftDb' => $nftDb ))); + $nft['full_image'] = $nft['image']; $nft['info']['level'] = 1; $nft['info']['quality'] = 1; $nft['info']['lucky'] = $equipMeta ? $equipMeta['gun_lucky'] : 0; @@ -199,7 +205,7 @@ class Nft extends BaseModel { break; case Nft::CHIP_TYPE: { - + $nft['hide_attr'] = 1; } break; default: