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

Merged
Hide_D merged 61 commits from ng_main into devel 2023-03-09 02:25:31 +09:00
2 changed files with 10 additions and 3 deletions
Showing only changes of commit 8f0057ff51 - Show all commits
+2 -2
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');
+8 -1
View File
@@ -154,10 +154,17 @@ export type NationInfoFull = ValidResponse & {
nation: NationItem;
isFull: true,
impossibleStrategicCommandLists: [string, number][];
nationNotice: string,
nationNotice: NationNotice,
troops: Record<number, string>;
}
export type NationNotice = {
date: string,
msg: string,
author: string,
authorID: number,
}
export type NationInfoResponse =
| (ValidResponse & {
nation: NationStaticItem;