From 104209acff1f6978b526ad26a8522441da61d656 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 3 Mar 2022 15:41:24 +0800 Subject: [PATCH] 1 --- doc/User.py | 15 ++------------- webapp/controller/UserController.class.php | 9 +++++++++ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/doc/User.py b/doc/User.py index 412e94d2..3d010f16 100644 --- a/doc/User.py +++ b/doc/User.py @@ -52,18 +52,6 @@ class User(object): ['property_chg', _common.PropertyChg(), '属性变更'], ] }, - { - 'name': 'setAlreadyGuide', - 'desc': '设置为已引导状态', - 'group': 'User', - 'url': 'webapp/index.php?c=User&a=setAlreadyGuide', - 'params': [ - ], - 'response': [ - _common.RspHead(), - ['property_chg', _common.PropertyChg(), '属性变更'], - ] - }, { 'name': 'update', 'desc': '更新用户信息', @@ -75,7 +63,8 @@ class User(object): ['head_id', 0, '更新头像(可选参数,不传就不更新)'], ['head_frame', 0, '更新头像框(可选参数,不传就不更新)'], ['hero_id', 0, '更新上阵英雄id(可选参数,不传就不更新)'], - ['first_fight', 0, '更新首次战斗(可选参数,不传就不更新)'] + ['first_fight', 0, '更新首次战斗(可选参数,不传就不更新)'], + ['already_guide', 0, '已引导(可选参数,不传就不更新)'], ], 'response': [ _common.RspHead(), diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index 90fc60fa..d9e9fb49 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -308,6 +308,15 @@ class UserController extends BaseAuthedController { 'valid_func' => function ($val, &$errCode, &$errMsg) { return true; } + ), + 'already_guide' => array( + 'field_name' => 'already_guide', + 'val_func' => function ($val) { + return empty($val) ? 0 : 1; + }, + 'valid_func' => function ($val, &$errCode, &$errMsg) { + return true; + } ) ); $fieldsKv = array();