57 lines
1.3 KiB
PHP
57 lines
1.3 KiB
PHP
<?php
|
|
|
|
require_once('models/User.php');
|
|
require_once('models/Hero.php');
|
|
|
|
require_once('mt/Parameter.php');
|
|
require_once('mt/Drop.php');
|
|
require_once('mt/Season.php');
|
|
|
|
require_once('services/PropertyChgService.php');
|
|
require_once('services/SeasonService.php');
|
|
|
|
use phpcommon\SqlHelper;
|
|
use models\User;
|
|
use models\Hero;
|
|
|
|
class SeasonCardController extends BaseAuthedController {
|
|
|
|
private $propertyChgService = null;
|
|
private $userInfo = null;
|
|
private $seasonService = null;
|
|
|
|
public function _handlePre()
|
|
{
|
|
parent::_handlePre();
|
|
$currSeasonMeta = mt\Season::getCurrentSeason();
|
|
if (!$currSeasonMeta) {
|
|
$this->_rspErr(10, '服务器内部错误');
|
|
die();
|
|
}
|
|
$this->propertyChgService = new services\PropertyChgService();
|
|
$this->userInfo = $this->_safeGetOrmUserInfo();
|
|
$this->seasonService = new services\SeasonService();
|
|
if (!$this->seasonService->checkSeason($this->userInfo)) {
|
|
$this->userInfo = $this->_safeGetOrmUserInfo();
|
|
$this->propertyChgService->addUserChg();
|
|
}
|
|
}
|
|
|
|
public function info()
|
|
{
|
|
}
|
|
|
|
public function getReward()
|
|
{
|
|
}
|
|
|
|
public function buyLevel()
|
|
{
|
|
}
|
|
|
|
public function buyGiftPackage()
|
|
{
|
|
}
|
|
|
|
}
|