From 894a6397e10e0d8a38a031f063c7c1d0faf15b2e Mon Sep 17 00:00:00 2001 From: lightings <17062401@qq.com> Date: Mon, 31 Oct 2022 21:51:25 +0800 Subject: [PATCH] test docs for shop --- doc/Shop.py | 18 ++++++++++++++++-- doc/_common.py | 31 +++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/doc/Shop.py b/doc/Shop.py index c197434d..37f142f1 100644 --- a/doc/Shop.py +++ b/doc/Shop.py @@ -53,16 +53,30 @@ class Shop(object): ] }, { - 'name': 'getStageList', + 'name': 'getItemList', 'desc': '获取指定层级的商店id列表', 'group': 'Shop', 'url': 'webapp/index.php?c=Shop&a=getStageList', 'params': [ _common.ReqHead(), + ['stage', 0, '1: 2:'] ], 'response': [ _common.RspHead(), - ['!shop_id_list', [0], '1:Recommend 2:Hero 3:Weapon 4:Chip 5:Consume'] + ['!shop_id_list', [_common.NewGoods()], '1:Recommend 2:Hero 3:Weapon 4:Chip 5:Consume'] + ] + }, + { + 'name': 'getShopNames', + 'desc': '获取商店名称', + 'group': 'Shop', + 'url': 'webapp/index.php?c=Shop&a=getShowName', + 'params': [ + _common.ReqHead() + ], + 'response': [ + _common.RspHead(), + ['!shop_name_list', [_common.ShopName()], '商店id名字对应表'] ] } ] diff --git a/doc/_common.py b/doc/_common.py index 9e2748ea..a16c2664 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -378,7 +378,38 @@ class Goods(object): ['bought_times', 0, '已购买次数'], ['total_buy_times', 0, '总的可购买次数'], ] +class NewGoods(object): + def __init__(self): + self.fields = [ + ['goods_id', 0, '商品id'], + ['shop_id', 0, '所属商店id'], + ['shopstage', 0, '商店层级'], + ['tag', 0, '标签'], + ['recommend', 0, '推荐页位置'], + ['token_type', 0, '代币类型 代币类型\ + 若需设定多种代币类型贩售 1|2 中间以 | 隔开\ + \ + 1 = CEG\ + 2 = CEC\ + 3 = BCEG\ + \ + 11 = USDT (Polygon)\ + 12 = USDC (Polygon)\ + 13 = BUSD (BSC)\ + \ + 101 = MATIC (Polygon)\ + 102 = BNB (BSC)\ + '], + ['price', 0, '价格 多种价格设置使用 | 隔开'] + ] +class ShopName(object): + def __init__(self): + self.fields = [ + ['id', 0, '商店id'], + ['name', 0, '商店名字'] + ] + class Shop(object): def __init__(self):