feat: Vue3로 새롭게 작성한 메인 페이지 (#229)

- v_front.php
- API 추가
  - General/GetFrontInfo
  - Global/GetGlobalMenu
- DTO 추가
  - MenuItem, MenuMulti, MenuSplit
- 글로벌 메뉴 출력 방식 변경
  - d_setting/GlobalMenu.php

Reviewed-on: https://storage.hided.net/gitea/devsam/core/pulls/229
This commit was merged in pull request #229.
This commit is contained in:
2023-03-09 02:25:31 +09:00
parent 4ba9468fae
commit 6f5d7ff84b
35 changed files with 4260 additions and 127 deletions
+6 -3
View File
@@ -27,7 +27,7 @@ class GetNationInfo extends \sammo\BaseAPI
public function validateArgs(): ?string
{
$v = new Validator($this->args);
$v->rule('boolean', 'full');
$v->rule('in', 'full', ['true', 'false']);
if (!$v->validate()) {
return $v->errorStr();
@@ -70,7 +70,7 @@ class GetNationInfo extends \sammo\BaseAPI
$gameEnv = $gameStor->getValues(['year', 'month', 'startyear']);
$nation = $db->queryFirstRow(
'SELECT nation, `name`, color, capital, gennum, gold, rice, bill, rate, secretlimit, chief_set, scout, war, strategic_cmd_limit, surlimit, tech, `power`, `level`, `type` FROM nation WHERE id = %i',
'SELECT nation, `name`, color, capital, gennum, gold, rice, bill, rate, secretlimit, chief_set, scout, war, strategic_cmd_limit, surlimit, tech, `power`, `level`, `type` FROM nation WHERE nation = %i',
$nationID
);
$nationStor = \sammo\KVStorage::getStorage($db, $nationID, 'nation_env');
@@ -94,11 +94,14 @@ class GetNationInfo extends \sammo\BaseAPI
$troopName[$troopID] = $tName;
}
return [
$result = [
'result' => true,
'isFull' => $isFull,
'nation' => $nation,
'impossibleStrategicCommandLists' => $impossibleStrategicCommandLists,
'troops' => $troopName,
];
return $result;
}
}