From e3f859acb8700d6ffe2be71c17d4c928854f2995 Mon Sep 17 00:00:00 2001 From: hujiabin <519660157@qq.com> Date: Wed, 14 Aug 2024 14:45:11 +0800 Subject: [PATCH] 1 --- doc/Shop.py | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 doc/Shop.py diff --git a/doc/Shop.py b/doc/Shop.py new file mode 100644 index 00000000..2d9bb711 --- /dev/null +++ b/doc/Shop.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- + +import _common + +class Shop(object): + + def __init__(self): + self.apis = [ + { + 'name': 'getGoodsList', + 'desc': '获取商品列表', + 'group': 'Shop', + 'url': 'webapp/index.php?c=Shop&a=getGoodsList', + 'params': [ + _common.ReqHead(), + ['shop_id', 0, '商店id'], + ], + 'response': [ + _common.RspHead(), + ['!goods_list', [_common.Goods()], '商品列表'], + ] + }, + { + 'name': 'buyGoods', + 'desc': '购买商品', + 'group': 'Shop', + 'url': 'webapp/index.php?c=Shop&a=buyGoods', + 'params': [ + _common.ReqHead(), + ['goods_id', '', '商品唯一id'], + ['goods_num', 0, '商品数量 如果是宝箱可分为1、10 其他情况的购买为1'], + ], + 'response': [ + _common.RspHead(), + ['award', _common.Award(), '奖励信息'], + ['property_chg', _common.PropertyChg(), '属性变更'], + ] + }, + { + 'name': 'boxPreview', + 'desc': '宝箱道具预览', + 'group': 'Shop', + 'url': 'webapp/index.php?c=Shop&a=boxPreview', + 'params': [ + _common.ReqHead(), + ['goods_id', 0, '商品唯一id'], + ], + 'response': [ + _common.RspHead(), + ['!items', [0], '宝箱物品列表'], + ['free_num', 0, '免费次数'], + ] + } + ]