diff --git a/hwe/ts/PageNationGeneral.vue b/hwe/ts/PageNationGeneral.vue index 24007e1c..6297baa2 100644 --- a/hwe/ts/PageNationGeneral.vue +++ b/hwe/ts/PageNationGeneral.vue @@ -1,8 +1,15 @@ @@ -34,7 +41,7 @@ const envVal = ref({ turntime: "2022-02-22 22:22:22.22222", }); -const toolbarID = 'toolbar-id'; +const toolbarID = "toolbar-id"; const gameConstStore = ref(); provide("gameConstStore", gameConstStore); @@ -51,7 +58,7 @@ void Promise.all([storeP]).then(() => { asyncReady.value = true; }); -onMounted(async () => { +async function reload() { try { const { column, list, permission, troops, env } = await SammoAPI.Nation.GeneralList(); troopList.value = {}; @@ -72,7 +79,7 @@ onMounted(async () => { return { permission, ...v }; }); - for(const [troopLeader, troopName] of troops){ + for (const [troopLeader, troopName] of troops) { troopList.value[troopLeader] = troopName; } } else { @@ -83,6 +90,10 @@ onMounted(async () => { console.error(e); throw e; } +} + +onMounted(async () => { + await reload(); });