From 913a938512064c94dfc6e90b5996d1d7c8656a58 Mon Sep 17 00:00:00 2001 From: Horbin <2240045751@qq.com> Date: Mon, 15 Apr 2024 13:07:26 +0800 Subject: [PATCH] fix: message. --- front-end/src/pages/SecretPage.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/front-end/src/pages/SecretPage.vue b/front-end/src/pages/SecretPage.vue index a596574..2dff365 100644 --- a/front-end/src/pages/SecretPage.vue +++ b/front-end/src/pages/SecretPage.vue @@ -9,6 +9,9 @@ import { checkLoginPromise } from '@/utils/userUtils'; import { getSecret, updateState, updateMessage } from '@/api/secretAPI' + const message = useMessage() + const router = useRouter() + // states const secret_state = ref(-1); // -1: first see, 0: seen, 1: like, 2: dislike let secret = null; @@ -86,8 +89,6 @@ } onMounted(() => { - const message = useMessage() - const router = useRouter() checkLoginPromise().then((result) => { if (!result) { router.push('/')