1
This commit is contained in:
parent
f2f1d2f49e
commit
97722088b6
75
doc/Mall.py
Normal file
75
doc/Mall.py
Normal file
@ -0,0 +1,75 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import _common
|
||||
|
||||
class Mall(object):
|
||||
|
||||
def __init__(self):
|
||||
self.apis = [
|
||||
{
|
||||
'name': 'productOnline',
|
||||
'desc': '出售NFT',
|
||||
'group': 'Mall',
|
||||
'url': 'webapp/index.php?c=Mall&a=productOnline',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
['account', '', '账号id'],
|
||||
['token', '', 'token'],
|
||||
['nft_token', '', 'nft_token'],
|
||||
['item_id', '', '道具id,'],
|
||||
['s_price', '', '出售价格USDT'],
|
||||
['amount', 0, '出售数量'],
|
||||
['payment_token_address', '', 'payment_token_address'],
|
||||
['nonce', '', 'nonce'],
|
||||
['signature', '', '签名soliditySha3(type, payment_token_address, price, nonce), 签名的replace客户端做处理'],
|
||||
['net_id', '', '网络id'],
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead()
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': 'productOffline',
|
||||
'desc': '下架物品',
|
||||
'group': 'Mall',
|
||||
'url': 'webapp/index.php?c=Mall&a=productOffline',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
['account', '', '账号id'],
|
||||
['idx', '', '出售的idx'],
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead()
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': 'modifyPrice',
|
||||
'desc': '修改价格',
|
||||
'group': 'Mall',
|
||||
'url': 'webapp/index.php?c=Mall&a=modifyPrice',
|
||||
'params':[
|
||||
_common.ReqHead(),
|
||||
['account', '', '账号id'],
|
||||
['idx', '', '出售的idx'],
|
||||
['s_price', '', '出售价格USDT'],
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead()
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': 'buy',
|
||||
'desc': '购买商品 (金币购买)',
|
||||
'group': 'Mall',
|
||||
'url': 'webapp/index.php?c=Mall&a=buy',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
['account', '', '账号id'],
|
||||
['idx', '', '出售的idx'],
|
||||
['s_price', '', '出售价格USDT'],
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead()
|
||||
]
|
||||
},
|
||||
]
|
@ -60,70 +60,4 @@ class Market(object):
|
||||
['!nfts', [_common.NftIntro()], 'nft列表'],
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': 'sell',
|
||||
'desc': '出售NFT',
|
||||
'group': 'Market',
|
||||
'url': 'webapp/index.php?c=Market&a=sell',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
['account', '', '账号id'],
|
||||
['token', '', 'token'],
|
||||
['nft_token', '', 'nft_token'],
|
||||
['item_id', '', '道具id,'],
|
||||
['s_price', '', '出售价格USDT'],
|
||||
['amount', 0, '出售数量'],
|
||||
['payment_token_address', '', 'payment_token_address'],
|
||||
['nonce', '', 'nonce'],
|
||||
['signature', '', '签名soliditySha3(type, payment_token_address, price, nonce), 签名的replace客户端做处理'],
|
||||
['net_id', '', '网络id'],
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead()
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': 'sellCancel',
|
||||
'desc': '下架物品',
|
||||
'group': 'Market',
|
||||
'url': 'webapp/index.php?c=Market&a=sellCancel',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
['account', '', '账号id'],
|
||||
['idx', '', '出售的idx'],
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead()
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': 'sellUpdatePrice',
|
||||
'desc': '修改价格',
|
||||
'group': 'Market',
|
||||
'url': 'webapp/index.php?c=Market&a=sellUpdatePrice',
|
||||
'params':[
|
||||
_common.ReqHead(),
|
||||
['account', '', '账号id'],
|
||||
['idx', '', '出售的idx'],
|
||||
['s_price', '', '出售价格USDT'],
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead()
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': 'buy',
|
||||
'desc': '购买商品 (金币购买)',
|
||||
'group': 'Market',
|
||||
'url': 'webapp/index.php?c=Market&a=buy',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
['account', '', '账号id'],
|
||||
['idx', '', '出售的idx'],
|
||||
['s_price', '', '出售价格USDT'],
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead()
|
||||
]
|
||||
},
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user