This commit is contained in:
songliang 2022-12-07 10:04:43 +08:00
parent 79391c8777
commit 548c6bd64b
2 changed files with 62 additions and 1 deletions

View File

@ -351,5 +351,42 @@ class Market(object):
['page_size', 0, '有效的分页大小'],
['!nfts', [NftIntro()], 'nft列表'],
]
}
},
{
'name': 'sellMyNft',
'desc': '出售NFT',
'group': 'Market',
'url': 'webapp/index.php?c=Market&a=sellMyNft',
'params': [
['account', '', '账号id'],
['token', '', 'token'],
['nft_token', '', 'nft_token'],
['s_price', '', '出售价格USDT'],
['payment_token_address', '', 'payment_token_address'],
['nonce', '', 'nonce'],
['signature', '', '签名soliditySha3(type, payment_token_address, price, nonce), 签名的replace客户端做处理'],
['net_id', '', '网络id'],
],
'response': [
_common.RspHead()
]
},
{
'name': 'buyNft',
'desc': '购买NFT',
'group': 'Market',
'url': 'webapp/index.php?c=Market&a=buyNft',
'params': [
['account', '', '账号id'],
['token', '', 'token'],
['nft_token', '', 'nft_token'],
['payment_token_address', '', 'payment_token_address'],
['nonce', '', 'nonce'],
['signature', '', '签名soliditySha3(type, payment_token_address, price, nonce), 签名的replace客户端做处理'],
['net_id', '', '网络id'],
],
'response': [
_common.RspHead()
]
},
]

View File

@ -664,5 +664,29 @@ class MarketController extends BaseController {
));
}
public function sellMyNft() {
$account = getReqVal('account', '');
$token = getReqVal('token', '');
$nft_token = getReqVal('nft_token', '');
$s_price = getReqVal('s_price', '');
$payment_token_address = getReqVal('payment_token_address', '');
$nonce = getReqVal('nonce', '');
$signature = getReqVal('signature', '');
$net_id = getReqVal('net_id', '');
$this->_rspOk();
}
public function buyNft() {
$account = getReqVal('account', '');
$token = getReqVal('token', '');
$nft_token = getReqVal('nft_token', '');
$payment_token_address = getReqVal('payment_token_address', '');
$nonce = getReqVal('nonce', '');
$signature = getReqVal('signature', '');
$net_id = getReqVal('net_id', '');
$this->_rspOk();
}
}