This commit is contained in:
aozhiwei 2024-04-20 16:52:50 +08:00
parent f158abb365
commit 1fe6d5ec6e

View File

@ -186,13 +186,24 @@ class OtherController extends BaseAuthedController {
{
$modeList = array();
$taskStatus = GlobalData::getServerTaskStatus();
mt\MapMode::traverseMeta(function($modeMeta) use(&$modeList){
array_push(
$modeList,
array(
'id' => $modeMeta['id']
)
);
$taskMeta = mt\ServerTaskTime::getCurrentTime();
mt\MapMode::traverseMeta(function($modeMeta) use(&$modeList, &$taskMeta, $taskStatus){
if ($modeMeta['is_open']) {
if ($modeMeta['limit_time']) {
if (empty($taskStatus)) {
return true;
}
if (myself()->_getNowTime() <= strtotime($taskMeta['obtain_end_time'])) {
return true;
}
}
array_push(
$modeList,
array(
'id' => $modeMeta['id']
)
);
}
return true;
});
$this->_rspData(array(