diff --git a/Build_God_Game/src/api/monster.ts b/Build_God_Game/src/api/monster.ts index afdc092..e8c9171 100644 --- a/Build_God_Game/src/api/monster.ts +++ b/Build_God_Game/src/api/monster.ts @@ -43,7 +43,7 @@ export interface BattleRewardDto { export const monsterApi = { getMonsterList: (): Promise => { - return http.get('/monster/all', {}) + return http.post('/monster/all', {}).then((res: any) => res.items || res) }, getMonsterById: (id: number): Promise => { diff --git a/Build_God_Game/src/views/MonsterListView.vue b/Build_God_Game/src/views/MonsterListView.vue index c42f414..ddff8ec 100644 --- a/Build_God_Game/src/views/MonsterListView.vue +++ b/Build_God_Game/src/views/MonsterListView.vue @@ -47,127 +47,183 @@ const handleChallenge = async (monster: { id: number; level: number }) => { router.push(`/battle?id=${monster.id}`) } +const handleGoBack = () => { + router.push('/game') +} + onMounted(async () => { await monsterStore.fetchMonsters() }) \ No newline at end of file