test docs for shop

This commit is contained in:
lightings 2022-10-31 21:51:25 +08:00
parent 291f4fe27f
commit 894a6397e1
2 changed files with 47 additions and 2 deletions

View File

@ -53,16 +53,30 @@ class Shop(object):
] ]
}, },
{ {
'name': 'getStageList', 'name': 'getItemList',
'desc': '获取指定层级的商店id列表', 'desc': '获取指定层级的商店id列表',
'group': 'Shop', 'group': 'Shop',
'url': 'webapp/index.php?c=Shop&a=getStageList', 'url': 'webapp/index.php?c=Shop&a=getStageList',
'params': [ 'params': [
_common.ReqHead(), _common.ReqHead(),
['stage', 0, '1: 2:']
], ],
'response': [ 'response': [
_common.RspHead(), _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名字对应表']
] ]
} }
] ]

View File

@ -378,7 +378,38 @@ class Goods(object):
['bought_times', 0, '已购买次数'], ['bought_times', 0, '已购买次数'],
['total_buy_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): class Shop(object):
def __init__(self): def __init__(self):