1
This commit is contained in:
parent
1a63c4a82f
commit
26b10fabcf
15
doc/Other.py
15
doc/Other.py
@ -61,4 +61,19 @@ class Other(object):
|
||||
['cec',0,'cec'],
|
||||
]
|
||||
},
|
||||
{
|
||||
'name': 'getMapModeList',
|
||||
'desc': '获取当前开启的地图模式列表',
|
||||
'group': 'Other',
|
||||
'url': 'webapp/index.php?c=Other&a=getMapModeList',
|
||||
'params': [
|
||||
_common.ReqHead(),
|
||||
],
|
||||
'response': [
|
||||
_common.RspHead(),
|
||||
['!mode_list', [
|
||||
['id',0,'mapMode配置id'],
|
||||
], '地图模式列表'],
|
||||
]
|
||||
},
|
||||
]
|
@ -4,6 +4,7 @@ require_once('services/MissionService.php');
|
||||
require_once('mt/RankSeason.php');
|
||||
require_once('mt/HashRateCommon.php');
|
||||
require_once('mt/ActivityRewards.php');
|
||||
require_once('mt/mapMode.php');
|
||||
|
||||
require_once('models/Mission.php');
|
||||
require_once('models/Fragment.php');
|
||||
@ -177,4 +178,21 @@ class OtherController extends BaseAuthedController {
|
||||
|
||||
}
|
||||
|
||||
public function getMapModeList()
|
||||
{
|
||||
$modeList = array();
|
||||
foreach (mt\MapMode::getMetaList() as $modeMeta) {
|
||||
array_push(
|
||||
$modeList,
|
||||
array(
|
||||
'id' => $modeMeta['id']
|
||||
)
|
||||
);
|
||||
}
|
||||
$this->_rspData(array(
|
||||
'mode_list' => $modeList
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user