From 36aae7e2546eff1f52a0846ba014d0e09f9d0481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E6=B1=89?= <5725748+qin_and_han_dynasties@user.noreply.gitee.com> Date: Sun, 19 Apr 2026 21:24:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=80=AA=E7=89=A9=E6=98=BE=E7=A4=BA=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Build_God_Game/src/api/monster.ts | 2 +- Build_God_Game/src/views/MonsterListView.vue | 414 ++++++++++++------- 2 files changed, 269 insertions(+), 147 deletions(-) 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