This commit is contained in:
aozhiwei 2024-08-01 11:42:43 +08:00
parent c7f2e19143
commit d04f973cf1
3 changed files with 105 additions and 0 deletions

53
doc/Bigwheel.py Normal file
View File

@ -0,0 +1,53 @@
# -*- coding: utf-8 -*-
import _common
class Bigwheel(object):
def __init__(self):
self.apis = [
{
'name': 'info',
'desc': '转盘信息',
'group': 'Bigwheel',
'url': 'webapp/index.php?c=Bigwheel&a=info',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
['info', _common.BigwheelInfo(), '转盘信息'],
]
},
{
'name': 'drawS',
'desc': '抽奖',
'group': 'Bigwheel',
'url': 'webapp/index.php?c=Bigwheel&a=drawS',
'params': [
_common.ReqHead(),
],
'response': [
_common.RspHead(),
['award', _common.Award(), '奖励信息'],
['property_chg', _common.PropertyChg(), '属性变更'],
['info', _common.BigwheelInfo(), '转盘信息'],
]
},
{
'name': 'buyS',
'desc': '购买',
'group': 'Bigwheel',
'url': 'webapp/index.php?c=Bigwheel&a=buyS',
'params': [
_common.ReqHead(),
['grid_id', 0, '格子id']
],
'response': [
_common.RspHead(),
['award', _common.Award(), '奖励信息'],
['property_chg', _common.PropertyChg(), '属性变更'],
['info', _common.BigwheelInfo(), '转盘信息'],
]
}
]

View File

@ -1845,3 +1845,26 @@ class RechargeHistory(object):
['amount', '', '货币数'],
['createtime', 0, '成交时间'],
]
class BigwheelGrid(object):
def __init__(self):
self.fields = [
['grid_id', 0, '格子id(Bigwheel表里的id字段)'],
['grid_state', 0, '0:未抽 1:已抽到且商品属于你 2:已抽到且商品还未属于你(需要购买)'],
['item_id', 0, '道具id(state>0时有效)'],
['item_num', 0, '道具数量(state>0时有效)'],
['buy_price', 0, '购买价格(state=2时有效)'],
]
class BigwheelInfo(object):
def __init__(self):
self.fields = [
['drawed_times', 0, '已抽次数'],
['total_times', 0, '总次数'],
['single_cost', 0, '单次抽奖消耗(钻石)'],
['double_cost', 0, '双次抽奖消耗(钻石)'],
['!items1', [BigwheelGrid()], '档位1'],
['!items2', [BigwheelGrid()], '档位2'],
]

View File

@ -0,0 +1,29 @@
<?php
require_once('mt/Sign.php');
require_once('mt/Parameter.php');
require_once('models/SignLog.php');
require_once('services/LogService.php');
require_once('services/AwardService.php');
require_once('services/PropertyChgService.php');
use phpcommon\SqlHelper;
use models\User;
use models\SignLog;
use services\LogService;
class BigwheelController extends BaseAuthedController
{
public function info(){
}
public function drawS(){
}
public function buyS(){
}
}