game2006api/doc/Mall.py
aozhiwei 97722088b6 1
2023-08-04 13:32:35 +08:00

76 lines
2.6 KiB
Python

# -*- 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()
]
},
]