84 lines
2.4 KiB
Python
84 lines
2.4 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
import _common
|
|
|
|
class SavingPot(object):
|
|
|
|
def __init__(self):
|
|
self.apis = [
|
|
{
|
|
'name': 'info',
|
|
'desc': '存钱罐信息',
|
|
'group': 'SavingPot',
|
|
'url': 'webapp/index.php?c=SavingPot&a=info',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['data', Info(), '存钱罐信息'],
|
|
]
|
|
},{
|
|
'name': 'smashOpenS',
|
|
'desc': '砸开',
|
|
'group': 'SavingPot',
|
|
'surl': 'webapp/index.php?c=SavingPot&a=smashOpenS',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['award', _common.AwardItem(), '奖励'],
|
|
['property_chg', _common.PropertyChg(), '属性变更'],
|
|
]
|
|
},{
|
|
'name': 'drawGoldS',
|
|
'desc': '取出',
|
|
'group': 'SavingPot',
|
|
'surl': 'webapp/index.php?c=SavingPot&a=drawGoldS',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['award', _common.AwardItem(), '奖励'],
|
|
['property_chg', _common.PropertyChg(), '属性变更'],
|
|
]
|
|
},{
|
|
'name': 'getRecord',
|
|
'desc': '获取记录',
|
|
'group': 'SavingPot',
|
|
'url': 'webapp/index.php?c=SavingPot&a=getRecord',
|
|
'params': [
|
|
_common.ReqHead(),
|
|
['page', 0, '第几页数据'],
|
|
],
|
|
'response': [
|
|
_common.RspHead(),
|
|
['pagination', _common.Pagination(), '分页信息'],
|
|
['!rows', [RecordList()], '记录列表']
|
|
]
|
|
},
|
|
|
|
]
|
|
|
|
|
|
class Info(object):
|
|
|
|
def __init__(self):
|
|
self.fields = [
|
|
['bind_gold', 0, '绑定金币数'],
|
|
['draw_state', 0, '1:今日已领取或砸开 0:反之'],
|
|
['up_times', 0, '今日升阶次数'],
|
|
]
|
|
|
|
class RecordList(object):
|
|
|
|
def __init__(self):
|
|
self.fields = [
|
|
['account_id', 0, 'account_id'],
|
|
['way', 0, '1:draw 2:open'],
|
|
['amount', 0, '绑币数量'],
|
|
['createtime', 0, '创建时间'],
|
|
['modifytime', 0, '修改时间'],
|
|
] |