This commit is contained in:
aozhiwei 2021-11-29 19:47:27 +08:00
parent 68e52e6a47
commit 1250c95864
2 changed files with 21 additions and 7 deletions

View File

@ -27,8 +27,9 @@ class Shop(object):
'url': 'webapp/index.php?c=Shop&a=buy',
'params': [
_common.ReqHead(),
['shop_id', '', '商店id'],
['goods_id', '', '商品id'],
['shop_id', 0, '商店id'],
['goods_id', 0, '商品id'],
['cost_item_id', 0, '支付方式'],
],
'response': [
_common.RspHead(),

View File

@ -104,18 +104,31 @@ class PropertyChg(object):
['user_info', UserInfo(), '用户信息变更(用来更新本地客户端字段(有则更新无则不变))']
]
class CostInfo(object):
def __init__(self):
self.fields = [
['cost_item_id', 0, '购买需要消耗的道具id'],
['cost_item_num', 0, '购买需要消耗的道具数量'],
]
class PriceInfo(object):
def __init__(self):
self.fields = [
['!cost_items', [CostInfo()], '购买需要扣费道具信息(金币、钻石视为道具,可能有多种价格)'],
['discount', 0, '折扣百分比0-100'],
['discount_left_time', 0, '折扣剩余时间(单位秒)'],
]
class Goods(object):
def __init__(self):
self.fields = [
['goods_id', 0, '商品id 用于购买的时候回传'],
['item_id', 0, '配置表id'],
['price_info', PriceInfo(), '价格信息'],
['flag_icon', '', '商品标记(商品左上角的显示图标,超值、9折等)'],
['cost_item_id', 0, '购买需要消耗的道具id(原价)'],
['cost_item_num', 0, '购买需要消耗的道具数量(原价)'],
['discount_cost_item_id', 0, '购买需要消耗的道具id(实际)'],
['discount_cost_item_num', 0, '购买需要消耗的道具数量免费时为0(实际)'],
['discount_left_time', 0, '折扣剩余时间(单位秒)'],
['limit_type', 0, '0:不限购(这时忽略bought_times、total_buy_times) 1:每日限购 2:周限购 3:累计限购'],
['bought_times', 0, '已购买次数'],
['total_buy_times', 0, '总的可购买次数'],