This commit is contained in:
aozhiwei 2021-12-08 19:48:35 +08:00
parent f608e1ffb5
commit b2b6d23100

View File

@ -6,6 +6,7 @@ require_once('mt/Season.php');
require_once('models/Season.php');
require_once('services/AwardService.php');
require_once('services/PropertyChgService.php');
require_once('services/SeasonService.php');
@ -16,6 +17,7 @@ use models\Season;
class SeasonController extends BaseAuthedController {
private $propertyChgService = null;
private $awardService = null;
private $userInfo = null;
private $seasonService = null;
private $currSeasonMeta = null;
@ -30,6 +32,7 @@ class SeasonController extends BaseAuthedController {
die();
}
$this->propertyChgService = new services\PropertyChgService();
$this->awardService = new services\AwardService();
$this->userInfo = $this->_safeGetOrmUserInfo();
$this->seasonService = new services\SeasonService();
if (!$this->seasonService->checkSeason($this->userInfo)) {
@ -51,16 +54,13 @@ class SeasonController extends BaseAuthedController {
{
$rankMeta = mt\Rank::get($this->userInfo['rank']);
$this->_rspData(array(
array(
'info' => array(
'season_id' => $this->currSeasonMeta['id'],
'rank' => $this->userInfo['rank'],
'max_score' => $rankMeta ? $rankMeta['max_score'] : 0,
'noshow_score_bar' => $rankMeta ? $rankMeta['noshow_score_bar'] : 1,
'mission' => $this->getMissionInfo()
)
),
'property_chg' => $this->propertyChgService->toDto()
'info' => array(
'season_id' => $this->currSeasonMeta['id'],
'rank' => $this->userInfo['rank'],
'max_score' => $rankMeta ? $rankMeta['max_score'] : 0,
'noshow_score_bar' => $rankMeta ? $rankMeta['noshow_score_bar'] : 1,
'mission' => $this->getMissionInfo()
)
));
}