feat(wip): 세력장수에서 암행부, 랭크 값 모두 불러옴
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<BContainer id="container" :toast="{ root: true }" class="pageNationGeneral bg0">
|
||||
<TopBackBar :title="title" />
|
||||
<GeneralList v-if="asyncReady" :list="generalList" :height="'fill'" />
|
||||
<GeneralList v-if="asyncReady" :list="generalList" :env="envVal" :height="'fill'" />
|
||||
<BottomBar />
|
||||
</BContainer>
|
||||
</template>
|
||||
@@ -20,11 +20,17 @@ import { BContainer } from "bootstrap-vue-3";
|
||||
import { onMounted, provide, ref } from "vue";
|
||||
import { SammoAPI } from "./SammoAPI";
|
||||
import { merge2DArrToObjectArr } from "./util/merge2DArrToObjectArr";
|
||||
import type { GeneralListItem } from "./defs/API/Nation";
|
||||
import type { GeneralListItem, GeneralListResponse } from "./defs/API/Nation";
|
||||
import GeneralList from "./components/GeneralList.vue";
|
||||
import { type GameConstStore, getGameConstStore } from "./GameConstStore";
|
||||
|
||||
const generalList = ref<GeneralListItem[]>([]);
|
||||
const envVal = ref<GeneralListResponse['env']>({
|
||||
year: 1,
|
||||
month: 1,
|
||||
turnterm: 1,
|
||||
turntime: '2022-02-22 22:22:22.22222'
|
||||
});
|
||||
|
||||
const gameConstStore = ref<GameConstStore>();
|
||||
provide('gameConstStore', gameConstStore);
|
||||
@@ -43,7 +49,7 @@ void Promise.all([storeP]).then(()=>{
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const { column, list, permission } = await SammoAPI.Nation.GeneralList();
|
||||
const { column, list, permission, env } = await SammoAPI.Nation.GeneralList();
|
||||
//XXX: 로직상 똑같은데....
|
||||
if (permission == 0) {
|
||||
const rawGeneralList = merge2DArrToObjectArr(column, list);
|
||||
@@ -57,6 +63,7 @@ onMounted(async () => {
|
||||
} else {
|
||||
throw `?? ${permission}`;
|
||||
}
|
||||
envVal.value = env;
|
||||
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
||||
Reference in New Issue
Block a user