From afaa2b19eadb6a2da0508f9db5679c081c8eb69a Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 29 Nov 2021 14:44:29 +0800 Subject: [PATCH] 1 --- doc/README.php | 4 ++-- doc/Shop.py | 1 + doc/_common.py | 7 +++++++ webapp/controller/BaseAuthedController.class.php | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/README.php b/doc/README.php index c16f69c..1e4784c 100644 --- a/doc/README.php +++ b/doc/README.php @@ -4,8 +4,8 @@ * @apiGroup AA开发说明 * @apiVersion 0.0.1 * @apiSuccessExample {json} Success-Response: - * { - * } + * 所有的协议都可能携带award和property_chg,award用来显示获得的东西,propery_chg用来更新本地数据 + * * * * diff --git a/doc/Shop.py b/doc/Shop.py index 1a52a6d..91a56d5 100644 --- a/doc/Shop.py +++ b/doc/Shop.py @@ -19,6 +19,7 @@ class Shop(object): 'response': [ _common.RspHead(), ['award', _common.Award(), '奖励信息'], + ['property_chg', _common.PropertyChg(), '属性变更'], ] }, ] diff --git a/doc/_common.py b/doc/_common.py index f021752..a9ae93a 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -99,3 +99,10 @@ class Award(object): self.fields = [ ['!items', [AwardItem()], '奖励物品列表'] ] + +class PropertyChg(object): + + def __init__(self): + self.fields = [ + ['user_info', UserInfo(), '用户信息变更(用来更新本地客户端字段(有则更新无则不变))'] + ] diff --git a/webapp/controller/BaseAuthedController.class.php b/webapp/controller/BaseAuthedController.class.php index b368168..266c9ba 100644 --- a/webapp/controller/BaseAuthedController.class.php +++ b/webapp/controller/BaseAuthedController.class.php @@ -105,7 +105,7 @@ class BaseAuthedController extends BaseController { { SqlHelper::update ($this->_getSelfMysql(), - 'user', + 't_user', array( 'account_id' => $this->_getAccountId() ),