diff --git a/doc/BlockChain.py b/doc/BlockChain.py index 3ff5c6c1..e8b40e55 100644 --- a/doc/BlockChain.py +++ b/doc/BlockChain.py @@ -122,4 +122,25 @@ class BlockChain(object): ['!params', [''], '合约参数列表'], ] }, + { + 'name': 'rechargeBuyS', + 'desc': 'usdt钻石充值', + 'group': 'BlockChain', + 'surl': 'webapp/index.php?c=BlockChain&a=rechargeBuyS', + 'params': [ + _common.ReqHead(), + ['goods_id', '', '商品id'], + ], + 'response': [ + _common.RspHead(), + ['order_id', '', '订单id'], + ['!calls', + [ + ['trans_id', '', '事务id'], + ['trans_req', _common.MFTransactionRequest(), '调用合约参数'], + ], + '合约调用-队列(排队执行上一个成功才能调用下一个)' + ] + ] + }, ] diff --git a/doc/Recharge.py b/doc/Recharge.py new file mode 100644 index 00000000..106163c9 --- /dev/null +++ b/doc/Recharge.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- + +import _common + +class Recharge(object): + + def __init__(self): + self.apis = [ + { + 'name': 'goodsList', + 'desc': '充值-商品列表', + 'group': 'Recharge', + 'url': 'webapp/index.php?c=Recharge&a=goodsList', + 'params': [ + _common.ReqHead(), + ], + 'response': [ + _common.RspHead(), + ['!goods', [_common.RechargeGoods()], '商品列表'] + ] + } + ] diff --git a/doc/_common.py b/doc/_common.py index 2db7ac3f..8c25b2de 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -1821,3 +1821,11 @@ class ChainActivity(object): ['to', '', 'to'], ['date', '', '事件发生时间'], ] + +class RechargeGoods(object): + + def __init__(self): + self.fields = [ + ['goods_id', '', '商品id(购买时用)'], + ['goods_meta', '', '配置表信息(和excel完全一样)'], + ]