diff --git a/doc/Other.py b/doc/Other.py index f9dc474f..90ddf3bb 100644 --- a/doc/Other.py +++ b/doc/Other.py @@ -84,6 +84,24 @@ class Other(object): ], '地图模式列表'], ] }, + { + 'name': 'getServerSwitch', + 'desc': '开关信息', + 'group': 'Other', + 'url': 'webapp/index.php?c=Other&a=getServerSwitch', + 'params': [ + _common.ReqHead(), + ], + 'response': [ + _common.RspHead(), + ['data', [ + ['heroChain',0,'英雄上链'], + ['goldSyn',0,'金币合成'], + ['pieceSyn',0,'碎片合成'], + ['pieceUp',0,'碎片升阶'], + ], '开关信息'], + ] + }, ] class Tag(object): diff --git a/webapp/bootstrap/config_loader.php b/webapp/bootstrap/config_loader.php index 8d29edd2..d6a72cf1 100644 --- a/webapp/bootstrap/config_loader.php +++ b/webapp/bootstrap/config_loader.php @@ -1,5 +1,6 @@ _getChannel() == IMTBL_CHANNEL || - myself()->_getChannel() == GUEST_CHANNEL)) { - phpcommon\sendError(1001, 'session expiration'); - die(); - } +// if (!(myself()->_getChannel() == IMTBL_CHANNEL || +// myself()->_getChannel() == GUEST_CHANNEL)) { +// phpcommon\sendError(1001, 'session expiration'); +// die(); +// } $r = $this->_getRedis($this->_getAccountId()); if (!(getReqVal('c', '') == 'User' && getReqVal('a', '') == 'login')) { if ((getReqVal('c', '') == 'Battle')) { @@ -152,10 +152,10 @@ class BaseAuthedController extends BaseController { { $lastActiveTime = $r->get(LAST_ACTIVE_TIME . $this->_getAccountId()); //第一次登录或者跨天更新最后活跃时间 - if (empty($lastActiveTime) || - $lastActiveTime < $this->_getNowDaySeconds()) { - $r->setPx(LAST_ACTIVE_TIME . $this->_getAccountId(), $this->_getNowTime(), 1000 * 3600 * 24); - } +// if (empty($lastActiveTime) || +// $lastActiveTime < $this->_getNowDaySeconds()) { +// $r->setPx(LAST_ACTIVE_TIME . $this->_getAccountId(), $this->_getNowTime(), 1000 * 3600 * 24); +// } } protected function updateSession($accountId, $sessionId) diff --git a/webapp/controller/OtherController.class.php b/webapp/controller/OtherController.class.php index 4d4a6128..95af1ee8 100644 --- a/webapp/controller/OtherController.class.php +++ b/webapp/controller/OtherController.class.php @@ -1,6 +1,7 @@ getConfig(); + $this->_rspData(array( + 'data'=>$con + )); + } + } diff --git a/webapp/models/Hero.php b/webapp/models/Hero.php index 244fce0a..92cb7b1f 100644 --- a/webapp/models/Hero.php +++ b/webapp/models/Hero.php @@ -214,7 +214,7 @@ class Hero extends BaseModel { ); $dto['is_avatar'] = 0; if (SERVER_ENV == _ONLINE) { - if ($dto['token_id'] >= 6240619010000001 && $dto['token_id'] <= 6240619010000100){ + if ($dto['token_id'] > 66240603010001668 && $dto['token_id'] <= 6240603010002168){ $dto['is_avatar'] = 1; } }else{ @@ -315,7 +315,7 @@ class Hero extends BaseModel { // $dto['nft_address'] = $nft_address; $dto['is_avatar'] = 0; if (SERVER_ENV == _ONLINE) { - if ($dto['token_id'] >= 6240619010000001 && $dto['token_id'] <= 6240619010000100){ + if ($dto['token_id'] > 66240603010001668 && $dto['token_id'] <= 6240603010002168){ $dto['is_avatar'] = 1; } }else{ diff --git a/webapp/services/ServerSwitch.php b/webapp/services/ServerSwitch.php new file mode 100644 index 00000000..665ae7b0 --- /dev/null +++ b/webapp/services/ServerSwitch.php @@ -0,0 +1,18 @@ +switchConfig){ + $this->initConfig(); + } + return $this->switchConfig; + } + + private $switchConfig = null; + + private function initConfig(){ + $this->switchConfig = getServerSwitchConfig(); + } + +}