From cbe138a3b7cd72e42f8c1d13e504f5d19b42b786 Mon Sep 17 00:00:00 2001 From: hujiabin Date: Thu, 18 Aug 2022 17:09:45 +0800 Subject: [PATCH] add doc 1 --- doc/Chip.py | 46 ++++++++++++++++++++++++++++++++++++++++++++-- doc/_common.py | 16 ++++++++++++++-- 2 files changed, 58 insertions(+), 4 deletions(-) diff --git a/doc/Chip.py b/doc/Chip.py index 898d63ea..b50584e1 100644 --- a/doc/Chip.py +++ b/doc/Chip.py @@ -9,16 +9,58 @@ class Chip(object): { 'name': 'chipList', 'desc': '获取芯片列表', - 'group': 'Bag', + 'group': 'Chip', 'url': 'webapp/index.php?c=Chip&a=chipList', 'params': [ _common.ReqHead(), - ['type', '', '芯片类型:1 角色;2 枪械'], + ['type', '', '芯片类型:1 英雄;2 枪械'], ], 'response': [ _common.RspHead(), ['!data', [_common.Chip()], '芯片列表'] ] + },{ + 'name': 'chipOrder', + 'desc': '芯片列表排序', + 'group': 'Chip', + 'url': 'webapp/index.php?c=Chip&a=chipOrder', + 'params': [ + _common.ReqHead(), + ['type', '', '芯片类型:1 英雄;2 枪械'], + ['order', '', 'asc 升序;desc 降序'], + ], + 'response': [ + _common.RspHead(), + ['!data', [_common.Chip()], '芯片列表'] + ] + },{ + 'name': 'beforeInlay', + 'desc': '芯片镶嵌前置,获取可镶嵌的芯片', + 'group': 'Chip', + 'url': 'webapp/index.php?c=Chip&a=beforeInlay', + 'params': [ + _common.ReqHead(), + ['type', '', '芯片类型:1 英雄;2 枪械'], + ], + 'response': [ + _common.RspHead(), + ['!data', [_common.Chip()], '芯片列表'] + ] + },{ + 'name': 'inlayChip', + 'desc': '芯片镶嵌', + 'group': 'Chip', + 'url': 'webapp/index.php?c=Chip&a=inlayChip', + 'params': [ + _common.ReqHead(), + ['hero_id', '', '英雄idx'], + ['token_id', '', '芯片token id'], + ], + 'response': [ + _common.RspHead(), + ['!data', [_common.Hero(),['!chip_core', [ChipCore()], '核心加成']], '英雄加成信息'] + ] }, + ] diff --git a/doc/_common.py b/doc/_common.py index f171aef0..53804fd0 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -633,11 +633,23 @@ class ChipAttr(object): ['attr_id', 0, '属性id'], ['type', 0, '1: 绝对值 2:百分比'], ['val', 0, '综合属性值'], - ['chip_type', 0, '1:角色芯片 2:枪械芯片'], + ['chip_type', 0, '1:英雄芯片 2:枪械芯片'], ['attr_num', 0, '成长属性值'], ['attr_pool_num', 0, '固定属性值'], ] +class ChipCore(object): + + def __init__(self): + self.fields = [ + ['chip_core_id', 0, '核心id'], + ['chip_core_type', 0, '1:英雄芯片核心 2:枪械芯片核心'], + ['chip_core_lv', 0, '核心等级'], + ['attr_id', 0, '芯片属性id'], + ['attr_number', 0, '属性加成'], + ['attr_add_type', 0, '加成类型:1 绝对值;2 百分比 '], + ] + class Chip(object): def __init__(self): @@ -648,7 +660,7 @@ class Chip(object): ['item_id', 0, '道具id'], ['item_num', 0, '道具数量'], ['chip_grade', 0, '芯片等级'], - ['chip_type', 0, '芯片类型:1 角色;2 枪械'], + ['chip_type', 0, '芯片类型:1 英雄;2 枪械'], ['state', 0, '芯片添加状态:0 正常;1 选择;-1 锁定'], ['supper_state', 0, '是否锁定:0 正常;1 锁住'], ['inlay_state', 0, '镶嵌状态:0 未镶嵌;1 镶嵌了'],