From 9ea995d7f519101d70b7b295ef8767b8a1a4fabf Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 6 Jun 2023 11:37:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E6=A1=A3=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/FirstTopup.py | 19 +++------- doc/User.py | 35 +++++++++++++++++-- doc/_common.py | 11 ++++++ .../controller/BaseAuthedController.class.php | 1 + webapp/controller/UserController.class.php | 6 ++++ 5 files changed, 54 insertions(+), 18 deletions(-) diff --git a/doc/FirstTopup.py b/doc/FirstTopup.py index 06691804..712628e0 100644 --- a/doc/FirstTopup.py +++ b/doc/FirstTopup.py @@ -1,17 +1,6 @@ # -*- coding: utf-8 -*- import _common - -class Reward(object): - - def __init__(self): - self.fields = [ - ['id', 0, 'id'], - ['group', '', 'group'], - ['goods_id', 0, 'goods_id'], - ['goods_num', 0, '堆叠数量'], - ['shop_icon', 0, '商店图标'], - ] class FirstTopup(object): @@ -28,8 +17,8 @@ class FirstTopup(object): 'response': [ _common.RspHead(), ['complete', 0, '是否已经完成首充 0-未完成 1-已完成'], - ['firstTopupList', [Reward], '奖励信息'], - ['status', [0], '领取状态 0-未领取 1-可领取 2-已领取'], + ['!firstTopupList', [_common.Reward()], '奖励信息'], + ['!status', [0], '领取状态 0-未领取 1-可领取 2-已领取'], ] }, { @@ -56,8 +45,8 @@ class FirstTopup(object): 'response': [ _common.RspHead(), ['group', 0, '奖励组id'], - ['status', [0], '领取状态 0-未领取 1-可领取 2-已领取'], - ['reward', [Reward], '奖励信息'], + ['!status', [0], '领取状态 0-未领取 1-可领取 2-已领取'], + ['!reward', [_common.Reward()], '奖励信息'], ] }, ] diff --git a/doc/User.py b/doc/User.py index 757ba360..e5e2a325 100644 --- a/doc/User.py +++ b/doc/User.py @@ -139,7 +139,8 @@ class User(object): 'response': [ _common.RspHead(), ] - },{ + }, + { 'name': 'initRank', 'desc': '排位初始化段位', 'group': 'User', @@ -151,7 +152,8 @@ class User(object): _common.RspHead(), ['property_chg', _common.PropertyChg(), '属性变更'], ] - },{ + }, + { 'name': 'selectFreeItem', 'desc': '选择免费英雄和武器', 'group': 'User', @@ -165,7 +167,8 @@ class User(object): _common.RspHead(), ['property_chg', _common.PropertyChg(), '属性变更'], ] - },{ + }, + { 'name': 'getFreeItemList', 'desc': '获取免费英雄和武器列表', 'group': 'User', @@ -178,4 +181,30 @@ class User(object): ['!data', [], '列表'], ] }, + { + 'name': 'getFreeItemList', + 'desc': '获取免费英雄和武器列表', + 'group': 'User', + 'url': 'webapp/index.php?c=User&a=getFreeItemList', + 'params': [ + _common.ReqHead(), + ], + 'response': [ + _common.RspHead(), + ['!data', [], '列表'], + ] + }, + { + 'name': 'updateAddressBind', + 'desc': '更新钱包绑定信息', + 'group': 'User', + 'url': 'webapp/index.php?c=User&a=updateAddressBind', + 'params': [ + _common.ReqHead(), + ['jwt', '', 'jwt数据'], + ], + 'response': [ + _common.RspHead(), + ] + }, ] diff --git a/doc/_common.py b/doc/_common.py index 2da1295c..dbc4f354 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -1156,3 +1156,14 @@ class BattleReward(object): ['hero', BattleCegReward(), '英雄奖励'], ['!items', [BattleItemReward()], '碎片奖励'], ] + +class Reward(object): + + def __init__(self): + self.fields = [ + ['id', 0, 'id'], + ['group', '', 'group'], + ['goods_id', 0, 'goods_id'], + ['goods_num', 0, '堆叠数量'], + ['shop_icon', 0, '商店图标'], + ] diff --git a/webapp/controller/BaseAuthedController.class.php b/webapp/controller/BaseAuthedController.class.php index 2d8fbf63..e435fd0a 100644 --- a/webapp/controller/BaseAuthedController.class.php +++ b/webapp/controller/BaseAuthedController.class.php @@ -38,6 +38,7 @@ class BaseAuthedController extends BaseController { private $accountId = ''; private $sessionId = ''; private $mysqlConn = null; + private $address = null; private function isWhiteList() { diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index fc2ba4db..f3aa8410 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -800,6 +800,12 @@ class UserController extends BaseAuthedController { ]); } + public function updateAddressBind() + { + $hero_uniid = getReqVal('jwt', ''); + $this->_rspOk(); + } + private function dampingElo($userInfo){ //每天elo衰减 $time_diff = myself()->_getNowTime()-$userInfo['last_login_time'];