From 93923094034fe36a563939700450114d69201524 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 29 Nov 2021 14:57:14 +0800 Subject: [PATCH] 1 --- doc/User.py | 12 ------------ webapp/controller/UserController.class.php | 19 +++++++++---------- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/doc/User.py b/doc/User.py index 2247c6c6..bdaf6103 100644 --- a/doc/User.py +++ b/doc/User.py @@ -47,18 +47,6 @@ class User(object): ['info',_common.UserInfo(), '用户信息'], ] }, - { - 'name': 'clientBattleReport', - 'desc': '客户端战报', - 'group': 'User', - 'url': 'webapp/index.php?c=User&a=clientBattleReport', - 'params': [ - _common.ReqHead(), - ], - 'response': [ - _common.RspHead(), - ] - }, ] self.internalApis = [ { diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index f2054b9f..c64eafe5 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -108,6 +108,15 @@ class UserController extends BaseAuthedController { return false; } } + ), + 'first_fight' => array( + 'field_name' => 'first_fight', + 'val_func' => function ($val) { + return empty($val) ? 0 : 1; + }, + 'valid_func' => function ($val, &$errCode, &$errMsg) { + return true; + } ) ); $fieldsKv = array(); @@ -155,16 +164,6 @@ class UserController extends BaseAuthedController { )); } - public function clientBattleReport() - { - $this->_updateUserInfo(array( - 'first_fight' => function () { - return '1'; - } - )); - $this->_rspOk(); - } - public function battleReport() { $userInfo = $this->_getOrmUserInfo();