1
This commit is contained in:
parent
b5e7ccd0be
commit
7a7c76e40a
@ -43,23 +43,24 @@ class UserController extends BaseAuthedController {
|
|||||||
$avatarUrl = '18003';
|
$avatarUrl = '18003';
|
||||||
|
|
||||||
$userInfo = $this->_safeGetOrmUserInfo();
|
$userInfo = $this->_safeGetOrmUserInfo();
|
||||||
if (SERVER_ENV == _ONLINE) {
|
// if (SERVER_ENV == _ONLINE) {
|
||||||
if (!$userInfo) {
|
// if (!$userInfo) {
|
||||||
$this->createNewUser($userName, $avatarUrl);
|
// $this->createNewUser($userName, $avatarUrl);
|
||||||
$this->addChip(); //测试数据,上线要删除
|
// $this->addChip(); //测试数据,上线要删除
|
||||||
$this->addFragmentBox(); //测试数据,上线要删除
|
// $this->addFragmentBox(); //测试数据,上线要删除
|
||||||
$userInfo = $this->_getOrmUserInfo();
|
// $userInfo = $this->_getOrmUserInfo();
|
||||||
$this->_setV(TN_RANK_STATUS, 0, 1);
|
// $this->_setV(TN_RANK_STATUS, 0, 1);
|
||||||
}
|
// }
|
||||||
if (!$this->loginCheck($userInfo)) {
|
// if (!$this->loginCheck($userInfo)) {
|
||||||
$userInfo = $this->_getOrmUserInfo();
|
// $userInfo = $this->_getOrmUserInfo();
|
||||||
}
|
// }
|
||||||
}else{
|
// }else{
|
||||||
//测试服
|
//测试服
|
||||||
if (!$userInfo) {
|
if (!$userInfo) {
|
||||||
$this->createNewUserV2($userName);
|
$this->createNewUserV2($userName);
|
||||||
$this->addChip(); //测试需要,上线要删除
|
$this->addChip(); //测试需要,上线要删除
|
||||||
$this->addFragmentBox(); //测试需要,上线要删除
|
$this->addFragmentBox(); //测试需要,上线要删除
|
||||||
|
$this->_addFreeItem(); //测试需要,上线要删除
|
||||||
$userInfo = $this->_getOrmUserInfo();
|
$userInfo = $this->_getOrmUserInfo();
|
||||||
$this->_setV(TN_RANK_STATUS, 0, 1);
|
$this->_setV(TN_RANK_STATUS, 0, 1);
|
||||||
}
|
}
|
||||||
@ -70,7 +71,7 @@ class UserController extends BaseAuthedController {
|
|||||||
$this->_updateUserInfo(array(
|
$this->_updateUserInfo(array(
|
||||||
'last_login_time'=>myself()->_getNowTime(),
|
'last_login_time'=>myself()->_getNowTime(),
|
||||||
));
|
));
|
||||||
}
|
// }
|
||||||
$this->updateLastSeason($userInfo);
|
$this->updateLastSeason($userInfo);
|
||||||
$this->_rspData(array(
|
$this->_rspData(array(
|
||||||
'info' => User::show($userInfo),
|
'info' => User::show($userInfo),
|
||||||
@ -155,6 +156,29 @@ class UserController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function _addFreeItem(){
|
||||||
|
foreach (mt\Parameter::getListValue('creator_hero_id') as $heroId) {
|
||||||
|
$heroMeta = mt\Item::get($heroId);
|
||||||
|
if ($heroMeta) {
|
||||||
|
Hero::addHero($heroMeta);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$addItems =array();
|
||||||
|
foreach (mt\Parameter::getListValue('creator_present_items') as $itemsStr) {
|
||||||
|
list($itemId, $itemNum) = explode(':', $itemsStr);
|
||||||
|
if ($itemNum > 0) {
|
||||||
|
array_push($addItems,
|
||||||
|
array(
|
||||||
|
'item_id' => $itemId,
|
||||||
|
'item_num' => $itemNum
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$awardService = new services\AwardService();
|
||||||
|
$propertyChgService = new services\PropertyChgService();
|
||||||
|
$this->_addItems($addItems, $awardService, $propertyChgService);
|
||||||
|
}
|
||||||
|
|
||||||
private function loginCheck($userInfo)
|
private function loginCheck($userInfo)
|
||||||
{
|
{
|
||||||
$seasonService = new services\SeasonService();
|
$seasonService = new services\SeasonService();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user