1
This commit is contained in:
parent
6dc68804de
commit
e3f682521c
@ -13,7 +13,7 @@ class Market(object):
|
|||||||
'url': 'webapp/index.php?c=Market&a=search',
|
'url': 'webapp/index.php?c=Market&a=search',
|
||||||
'params': [
|
'params': [
|
||||||
['page', 0, '获取第几页数据'],
|
['page', 0, '获取第几页数据'],
|
||||||
['type', 0, '0:英雄 1:枪支 2:芯片'],
|
['type', 0, '0: 系统商店 1: 用户商店'],
|
||||||
['sort', '', '排序字段'],
|
['sort', '', '排序字段'],
|
||||||
],
|
],
|
||||||
'response': [
|
'response': [
|
||||||
@ -28,6 +28,7 @@ class Market(object):
|
|||||||
'group': 'Market',
|
'group': 'Market',
|
||||||
'url': 'webapp/index.php?c=Market&a=buy',
|
'url': 'webapp/index.php?c=Market&a=buy',
|
||||||
'params': [
|
'params': [
|
||||||
|
['goods_id', '', '商品id'],
|
||||||
],
|
],
|
||||||
'response': [
|
'response': [
|
||||||
_common.RspHead(),
|
_common.RspHead(),
|
||||||
@ -39,10 +40,11 @@ class Market(object):
|
|||||||
'group': 'Market',
|
'group': 'Market',
|
||||||
'url': 'webapp/index.php?c=Shop&a=detail',
|
'url': 'webapp/index.php?c=Shop&a=detail',
|
||||||
'params': [
|
'params': [
|
||||||
|
['goods_id', '', '商品id'],
|
||||||
],
|
],
|
||||||
'response': [
|
'response': [
|
||||||
_common.RspHead(),
|
_common.RspHead(),
|
||||||
# ['info', _common.NftDetail(), '商品详细信息'],
|
['info', _common.NftDetail(), '商品详细信息'],
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -31,6 +31,15 @@ class Attr(object):
|
|||||||
['val', 0, '属性值'],
|
['val', 0, '属性值'],
|
||||||
]
|
]
|
||||||
|
|
||||||
|
class AttrDesc(object):
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self.fields = [
|
||||||
|
['attr_id', 0, '属性id'],
|
||||||
|
['type', 0, '0: 绝对值 1:百分比'],
|
||||||
|
['val', 0, '属性值'],
|
||||||
|
]
|
||||||
|
|
||||||
class SystemCurrency(object):
|
class SystemCurrency(object):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -38,7 +47,24 @@ class SystemCurrency(object):
|
|||||||
['type', 0, '类型'],
|
['type', 0, '类型'],
|
||||||
['name', '', '类型'],
|
['name', '', '类型'],
|
||||||
['value', 0, '值'],
|
['value', 0, '值'],
|
||||||
['decimals', 0, '值'],
|
['decimals', 0, '精度'],
|
||||||
|
]
|
||||||
|
|
||||||
|
class Sale(object):
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self.fields = [
|
||||||
|
['price', SystemCurrency(), '价格'],
|
||||||
|
['payment_token', [
|
||||||
|
['id', '', ''],
|
||||||
|
['created_at', 0, '创建utc时间'],
|
||||||
|
['last_modified_at', 0, '最后修改utc时间'],
|
||||||
|
['name', '', '名称'],
|
||||||
|
['symbol', '', 'symbol'],
|
||||||
|
['decimals', 0, '精度'],
|
||||||
|
['contract_address', 0, '合约地址'],
|
||||||
|
['enabled', 0, 'enabled'],
|
||||||
|
], '支付token'],
|
||||||
]
|
]
|
||||||
|
|
||||||
class Page(object):
|
class Page(object):
|
||||||
@ -400,36 +426,40 @@ class NftHero(object):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.fields = [
|
self.fields = [
|
||||||
|
['name', '', '英雄名'],
|
||||||
|
['!attr', [AttrDesc()], '属性'],
|
||||||
]
|
]
|
||||||
|
|
||||||
class NftGun(object):
|
class NftGun(object):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.fields = [
|
self.fields = [
|
||||||
|
['name', '', '枪支名'],
|
||||||
|
['!attr', [AttrDesc()], '属性'],
|
||||||
]
|
]
|
||||||
|
|
||||||
class NftChip(object):
|
class NftChip(object):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.fields = [
|
self.fields = [
|
||||||
|
['name', '', '芯片名'],
|
||||||
|
['!attr', [AttrDesc()], '属性'],
|
||||||
]
|
]
|
||||||
|
|
||||||
class Nft(object):
|
class Nft(object):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.fields = [
|
self.fields = [
|
||||||
|
['goods_id', '', '商品id'],
|
||||||
['nft_id', '', 'nft id'],
|
['nft_id', '', 'nft id'],
|
||||||
['type', 0, '类型 0:英雄 1:枪支 2:芯片'],
|
['type', 0, '类型 0:英雄 1:枪支 2:芯片'],
|
||||||
['token_id', '', '代币id?'],
|
['token_id', '', '代币id?'],
|
||||||
['status', 0, '状态'],
|
['status', 0, '状态'],
|
||||||
['ref_id', '', '引用id?'],
|
|
||||||
['ref_type', 0, '引用类型?'],
|
|
||||||
['owner_address', '', '所有者地址'],
|
['owner_address', '', '所有者地址'],
|
||||||
['owner_id', '', '所有者'],
|
['owner_id', '', '所有者'],
|
||||||
['image_avatar', '', '图片'],
|
['image_avatar', '', '图片'],
|
||||||
['image_full', '', '图片-全'],
|
['image_full', '', '图片-全'],
|
||||||
['price', 0, '价格'],
|
['price', SystemCurrency(), '价格'],
|
||||||
['system_currency', SystemCurrency(), '系统货币'],
|
|
||||||
['info', Union([
|
['info', Union([
|
||||||
[NftHero(), '英雄'],
|
[NftHero(), '英雄'],
|
||||||
[NftGun(), '枪支'],
|
[NftGun(), '枪支'],
|
||||||
@ -443,46 +473,46 @@ class NftHeroDetail(object):
|
|||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.fields = [
|
self.fields = [
|
||||||
|
['name', '', '英雄名'],
|
||||||
|
['!attr', [AttrDesc()], '属性'],
|
||||||
]
|
]
|
||||||
|
|
||||||
class NftGunDetail(object):
|
class NftGunDetail(object):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.fields = [
|
self.fields = [
|
||||||
|
['name', '', '枪支名'],
|
||||||
|
['!attr', [AttrDesc()], '属性'],
|
||||||
]
|
]
|
||||||
|
|
||||||
class NftChipDetail(object):
|
class NftChipDetail(object):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.fields = [
|
self.fields = [
|
||||||
|
['name', '', '芯片名'],
|
||||||
|
['!attr', [AttrDesc()], '属性'],
|
||||||
]
|
]
|
||||||
|
|
||||||
class NftDetail(object):
|
class NftDetail(object):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.fields = [
|
self.fields = [
|
||||||
|
['goods_id', '', '商品id'],
|
||||||
['nft_id', '', 'nft id'],
|
['nft_id', '', 'nft id'],
|
||||||
['type', 0, '类型 0:英雄 1:枪支 2:芯片'],
|
['type', 0, '类型 0:英雄 1:枪支 2:芯片'],
|
||||||
['token_id', '', '代币id?'],
|
['token_id', '', '代币id?'],
|
||||||
['status', 0, '状态'],
|
['status', 0, '状态'],
|
||||||
['ref_id', '', '引用id?'],
|
['user_id', '', '用户id'],
|
||||||
['ref_type', 0, '引用类型?'],
|
['user_using_id', '', '用户using id'],
|
||||||
['owner_address', '', '所有者地址'],
|
['owner_address', '', '所有者地址'],
|
||||||
['owner_id', '', '所有者'],
|
['owner_name', '', '所有名字'],
|
||||||
['image_avatar', '', '图片'],
|
['sale', Sale(), '售卖信息'],
|
||||||
['image_full', '', '图片-全'],
|
['last_price', SystemCurrency(), '最后一次售卖价格'],
|
||||||
['price', 0, '价格'],
|
['info', Union([
|
||||||
['system_currency', [
|
[NftHeroDetail(), '英雄'],
|
||||||
['type', 0, '类型'],
|
[NftGunDetail(), '枪支'],
|
||||||
['name', '', '类型'],
|
[NftChipDetail(), '芯片'],
|
||||||
['value', 0, '值'],
|
]), 'nft详细信息'],
|
||||||
['decimals', 0, '值'],
|
|
||||||
], '系统货币'],
|
|
||||||
# ['info', [
|
|
||||||
# ['info0', NftHeroDetail(), '英雄'],
|
|
||||||
# ['info1', NftGunDetail(), '枪支'],
|
|
||||||
# ['info2', NftChipDetail(), '芯片'],
|
|
||||||
# ], 'nft信息'],
|
|
||||||
['created_at', 0, '创建时间(utc时间)'],
|
['created_at', 0, '创建时间(utc时间)'],
|
||||||
['last_modified_at', 0, '最后修改时间(utc时间)'],
|
['last_modified_at', 0, '最后修改时间(utc时间)'],
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user