From 61b5acffbf34249c35277c7b2ea55eba578f0016 Mon Sep 17 00:00:00 2001 From: hujiabin Date: Wed, 19 Oct 2022 14:28:46 +0800 Subject: [PATCH] 1 --- doc/_common.py | 1 + webapp/controller/UserController.class.php | 5 +---- webapp/models/User.php | 2 ++ 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/_common.py b/doc/_common.py index 70191afe..340a3586 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -144,6 +144,7 @@ class UserInfo(object): ['pve_instance_id', 0, '已过pve副本id 0:一关未过'], ['!head_list', [0], '拥有的头像列表'], ['!head_frame_list', [0], '拥有的头像框列表'], + ['is_gain_item', 0, '0 为获取,1 以获取'], ] class UserSimple(object): diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index fbe62e81..242fdf0d 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -41,10 +41,8 @@ class UserController extends BaseAuthedController { $avatarUrl = '18003'; $userInfo = $this->_safeGetOrmUserInfo(); - $is_new_user = 0; if (SERVER_ENV == _ONLINE) { if (!$userInfo) { - $is_new_user = 1; $this->createNewUser($userName, $avatarUrl); $this->addChip(); //测试数据,上线要删除 $this->addFragmentBox(); //测试数据,上线要删除 @@ -57,7 +55,6 @@ class UserController extends BaseAuthedController { }else{ //测试服 if (!$userInfo) { - $is_new_user = 1; $this->createNewUserV2($userName); $this->addChip(); //测试需要,上线要删除 $this->addFragmentBox(); //测试需要,上线要删除 @@ -75,7 +72,6 @@ class UserController extends BaseAuthedController { $this->updateLastSeason($userInfo); $this->_rspData(array( 'info' => User::show($userInfo), - 'is_newUser' => $is_new_user, //1 是,0 不是 )); $this->_incDailyV(TN_DAILY_LOGINS, 0, 1); } @@ -658,6 +654,7 @@ class UserController extends BaseAuthedController { 'head_frame' => 60000, 'head_list' => json_encode($headList), 'head_frame_list' => json_encode(array(60000)), + 'is_gain_item' => 1, ); User::update($fields); $propertyChgService = new services\PropertyChgService(); diff --git a/webapp/models/User.php b/webapp/models/User.php index 13c1604e..0fd077fc 100644 --- a/webapp/models/User.php +++ b/webapp/models/User.php @@ -50,6 +50,7 @@ class User extends BaseModel { // 'head_list' => self::exportHeadList($row)['head_list'], // 'hero_list' => self::exportHeadList($row)['hero_list'], 'head_frame_list' => emptyReplace(json_decode($row['head_frame_list'], true), array()), + 'is_gain_item' => $row['is_gain_item'], ); } @@ -81,6 +82,7 @@ class User extends BaseModel { 'pve_instance_id' => $row['pve_instance_id'], 'like_count' => $row['like_count'], 'head_frame_list' => emptyReplace(json_decode($row['head_frame_list'], true), array()), + 'is_gain_item' => $row['is_gain_item'], 'is_leader' => 0 ); }