From 8c80200853ea3f985294bf99c6f93330977aa6f6 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 25 Mar 2022 13:56:21 +0800 Subject: [PATCH] 1 --- doc/BcShop.py | 37 ++++++++++++++++++++-- doc/Market.py | 87 +-------------------------------------------------- 2 files changed, 35 insertions(+), 89 deletions(-) diff --git a/doc/BcShop.py b/doc/BcShop.py index fe645a2a..016f2198 100644 --- a/doc/BcShop.py +++ b/doc/BcShop.py @@ -7,10 +7,10 @@ class BcShop(object): def __init__(self): self.apis = [ { - 'name': 'searchProduct', + 'name': 'search', 'desc': '获取出售的商品列表', 'group': 'BcShop', - 'url': 'webapp/index.php?c=BcShop&a=searchProduct', + 'url': 'webapp/index.php?c=BcShop&a=search', 'params': [ ['account', 0, '钱包账号'], ['page', 0, '获取第几页数据'], @@ -21,5 +21,36 @@ class BcShop(object): ['!rows', [_common.PreSaleBox()], '商品信息'], ['page', _common.Page(), '分页信息'], ] - } + }, + { + 'name': 'buy', + 'desc': '购买', + 'group': 'BcShop', + 'url': 'webapp/index.php?c=BcShop&a=buy', + 'params': [ + ['account', 0, '钱包账号'], + ['page', 0, '获取第几页数据'], + ['sort', '', '排序字段'], + ], + 'response': [ + _common.RspHead(), + ['!rows', [_common.PreSaleBox()], '商品信息'], + ['page', _common.Page(), '分页信息'], + ] + }, + { + 'name': 'queryOrder', + 'desc': '查询订单状态', + 'group': 'Market', + 'url': 'webapp/index.php?c=Market&a=queryOrder', + 'params': [ + ['account', 0, '钱包账号'], + ['token', '', 'token'], + ['order_id', 0, '订单id'], + ], + 'response': [ + _common.RspHead(errcode='当errcode!=0的时候客户端不需要再调用(停止定时器)'), + ['state', 0, '0:订单不存在 1:购买成功 2:交易处理中 3:交易失败'], + ] + }, ] diff --git a/doc/Market.py b/doc/Market.py index 6a7fee34..f851b329 100644 --- a/doc/Market.py +++ b/doc/Market.py @@ -145,89 +145,4 @@ class Market(object): _common.InfoNft() ] }, - { - 'name': 'productOnline', - 'desc': '上架商品', - 'group': 'Market', - 'url': 'webapp/index.php?c=Market&a=productOnline', - 'params': [ - ['account', '', '钱包账号'], - ['tips', '', 'tips'], - ['nonce', '', 'nonce'], - ['signature', '', '签名'], - ['net_id', '', '网络id'], - ], - 'response': [ - _common.RspHead(), - ['token', '', 'token'], - ] - }, - { - 'name': 'productOffline', - 'desc': '上架商品', - 'group': 'Market', - 'url': 'webapp/index.php?c=Market&a=productOffline', - 'params': [ - ['account', '', '钱包账号'], - ['tips', '', 'tips'], - ['nonce', '', 'nonce'], - ['signature', '', '签名'], - ['net_id', '', '网络id'], - ], - 'response': [ - _common.RspHead(), - ['token', '', 'token'], - ] - }, - { - 'name': 'buyProduct', - 'desc': '购买商品', - 'group': 'Market', - 'url': 'webapp/index.php?c=Market&a=productBuy', - 'params': [ - ['account', '', '钱包账号'], - ['tips', '', 'tips'], - ['nonce', '', 'nonce'], - ['signature', '', '签名'], - ['net_id', '', '网络id'], - ], - 'response': [ - _common.RspHead(), - ['token', '', 'token'], - ] - }, - { - 'name': 'getProductList', - 'desc': '获取出售的商品列表', - 'group': 'Market', - 'url': 'webapp/index.php?c=Market&a=productOffline', - 'params': [ - ['account', '', '钱包账号'], - ['tips', '', 'tips'], - ['nonce', '', 'nonce'], - ['signature', '', '签名'], - ['net_id', '', '网络id'], - ], - 'response': [ - _common.RspHead(), - ['token', '', 'token'], - ] - }, - { - 'name': 'searchProduct', - 'desc': '获取出售的商品列表', - 'group': 'Market', - 'url': 'webapp/index.php?c=Market&a=searchProduct', - 'params': [ - ['account', '', '钱包账号'], - ['tips', '', 'tips'], - ['nonce', '', 'nonce'], - ['signature', '', '签名'], - ['net_id', '', '网络id'], - ], - 'response': [ - _common.RspHead(), - ['token', '', 'token'], - ] - }, - ] + ]