This commit is contained in:
hujiabin 2022-10-19 14:28:46 +08:00
parent c314175ecc
commit 61b5acffbf
3 changed files with 4 additions and 4 deletions

View File

@ -144,6 +144,7 @@ class UserInfo(object):
['pve_instance_id', 0, '已过pve副本id 0:一关未过'], ['pve_instance_id', 0, '已过pve副本id 0:一关未过'],
['!head_list', [0], '拥有的头像列表'], ['!head_list', [0], '拥有的头像列表'],
['!head_frame_list', [0], '拥有的头像框列表'], ['!head_frame_list', [0], '拥有的头像框列表'],
['is_gain_item', 0, '0 为获取1 以获取'],
] ]
class UserSimple(object): class UserSimple(object):

View File

@ -41,10 +41,8 @@ class UserController extends BaseAuthedController {
$avatarUrl = '18003'; $avatarUrl = '18003';
$userInfo = $this->_safeGetOrmUserInfo(); $userInfo = $this->_safeGetOrmUserInfo();
$is_new_user = 0;
if (SERVER_ENV == _ONLINE) { if (SERVER_ENV == _ONLINE) {
if (!$userInfo) { if (!$userInfo) {
$is_new_user = 1;
$this->createNewUser($userName, $avatarUrl); $this->createNewUser($userName, $avatarUrl);
$this->addChip(); //测试数据,上线要删除 $this->addChip(); //测试数据,上线要删除
$this->addFragmentBox(); //测试数据,上线要删除 $this->addFragmentBox(); //测试数据,上线要删除
@ -57,7 +55,6 @@ class UserController extends BaseAuthedController {
}else{ }else{
//测试服 //测试服
if (!$userInfo) { if (!$userInfo) {
$is_new_user = 1;
$this->createNewUserV2($userName); $this->createNewUserV2($userName);
$this->addChip(); //测试需要,上线要删除 $this->addChip(); //测试需要,上线要删除
$this->addFragmentBox(); //测试需要,上线要删除 $this->addFragmentBox(); //测试需要,上线要删除
@ -75,7 +72,6 @@ class UserController extends BaseAuthedController {
$this->updateLastSeason($userInfo); $this->updateLastSeason($userInfo);
$this->_rspData(array( $this->_rspData(array(
'info' => User::show($userInfo), 'info' => User::show($userInfo),
'is_newUser' => $is_new_user, //1 是0 不是
)); ));
$this->_incDailyV(TN_DAILY_LOGINS, 0, 1); $this->_incDailyV(TN_DAILY_LOGINS, 0, 1);
} }
@ -658,6 +654,7 @@ class UserController extends BaseAuthedController {
'head_frame' => 60000, 'head_frame' => 60000,
'head_list' => json_encode($headList), 'head_list' => json_encode($headList),
'head_frame_list' => json_encode(array(60000)), 'head_frame_list' => json_encode(array(60000)),
'is_gain_item' => 1,
); );
User::update($fields); User::update($fields);
$propertyChgService = new services\PropertyChgService(); $propertyChgService = new services\PropertyChgService();

View File

@ -50,6 +50,7 @@ class User extends BaseModel {
// 'head_list' => self::exportHeadList($row)['head_list'], // 'head_list' => self::exportHeadList($row)['head_list'],
// 'hero_list' => self::exportHeadList($row)['hero_list'], // 'hero_list' => self::exportHeadList($row)['hero_list'],
'head_frame_list' => emptyReplace(json_decode($row['head_frame_list'], true), array()), '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'], 'pve_instance_id' => $row['pve_instance_id'],
'like_count' => $row['like_count'], 'like_count' => $row['like_count'],
'head_frame_list' => emptyReplace(json_decode($row['head_frame_list'], true), array()), 'head_frame_list' => emptyReplace(json_decode($row['head_frame_list'], true), array()),
'is_gain_item' => $row['is_gain_item'],
'is_leader' => 0 'is_leader' => 0
); );
} }