test shop.py

This commit is contained in:
lightings 2022-10-31 22:06:12 +08:00
parent 43d164a31a
commit 96c24f4edc
2 changed files with 14 additions and 21 deletions

View File

@ -53,24 +53,23 @@ class Shop(object):
]
},
{
'name': 'getItemList',
'desc': '获取指定层级的商店id列表',
'name': 'getGoodsList',
'desc': '获取商品列表',
'group': 'Shop',
'url': 'webapp/index.php?c=Shop&a=getStageList',
'url': 'webapp/index.php?c=Shop&a=getGoodsList',
'params': [
_common.ReqHead(),
['stage', 0, '1: 2:']
],
'response': [
_common.RspHead(),
['!shop_id_list', [_common.NewGoods()], '1:Recommend 2:Hero 3:Weapon 4:Chip 5:Consume']
['!goods_list', [_common.NewGoods()], '商品列表'],
]
},
{
'name': 'getShopNames',
'desc': '获取商店名称',
'group': 'Shop',
'url': 'webapp/index.php?c=Shop&a=getShowName',
'url': 'webapp/index.php?c=Shop&a=getShowNames',
'params': [
_common.ReqHead()
],

View File

@ -381,26 +381,20 @@ class Goods(object):
class NewGoods(object):
def __init__(self):
self.fields = [
['id', 0, '商品唯一id'],
['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, '价格 多种价格设置使用 | 隔开']
['token_type', '', '代币类型 参见shopGoods表格'],
['price', '', '价格 多种价格设置使用 | 隔开'],
['discount', '', '折扣 参见shopGoods表格'],
['limit_type', 0, '限购类型'],
['limit_num', 0, '限购数量'],
['buy_cond', '', '购买条件'],
['buy_gift', '', '购买次数赠品'],
['normal_gift', '', '普通狗赠品']
]
class ShopName(object):