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

View File

@ -381,26 +381,20 @@ class Goods(object):
class NewGoods(object): class NewGoods(object):
def __init__(self): def __init__(self):
self.fields = [ self.fields = [
['id', 0, '商品唯一id'],
['goods_id', 0, '商品id'], ['goods_id', 0, '商品id'],
['shop_id', 0, '所属商店id'], ['shop_id', 0, '所属商店id'],
['shopstage', 0, '商店层级'], ['shopstage', 0, '商店层级'],
['tag', 0, '标签'], ['tag', 0, '标签'],
['recommend', 0, '推荐页位置'], ['recommend', 0, '推荐页位置'],
['token_type', 0, '代币类型 代币类型\ ['token_type', '', '代币类型 参见shopGoods表格'],
若需设定多种代币类型贩售 1|2 中间以 | 隔开\ ['price', '', '价格 多种价格设置使用 | 隔开'],
\ ['discount', '', '折扣 参见shopGoods表格'],
1 = CEG\ ['limit_type', 0, '限购类型'],
2 = CEC\ ['limit_num', 0, '限购数量'],
3 = BCEG\ ['buy_cond', '', '购买条件'],
\ ['buy_gift', '', '购买次数赠品'],
11 = USDT (Polygon)\ ['normal_gift', '', '普通狗赠品']
12 = USDC (Polygon)\
13 = BUSD (BSC)\
\
101 = MATIC (Polygon)\
102 = BNB (BSC)\
'],
['price', 0, '价格 多种价格设置使用 | 隔开']
] ]
class ShopName(object): class ShopName(object):