From 2f14e3817a6275c1c4dfc1e2f4adccb2a072bf5a Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 13 Aug 2024 15:27:32 +0800 Subject: [PATCH] :lipstick: Optimize authorize third party client loading process --- pages/auth/authorize.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/auth/authorize.vue b/pages/auth/authorize.vue index 301febb..8e710b7 100755 --- a/pages/auth/authorize.vue +++ b/pages/auth/authorize.vue @@ -75,18 +75,18 @@ definePageMeta({ middleware: ["auth"], }) -const config = useRuntimeConfig() - const route = useRoute() const error = ref(null) -const loading = ref(false) +const loading = ref(true) const metadata = ref(null) const panel = ref("confirm") async function tryAuthorize() { + loading.value = true + const res = await solarFetch(`/cgi/auth/auth/o/authorize${window.location.search}`) if (res.status !== 200) { @@ -104,7 +104,7 @@ async function tryAuthorize() { } } -tryAuthorize() +onMounted(() => tryAuthorize()) function decline() { if (window.history.length > 0) {