diff --git a/Yi.Ai.Vue3/src/components/userPersonalCenter/components/APIKeyManagement.vue b/Yi.Ai.Vue3/src/components/userPersonalCenter/components/APIKeyManagement.vue index 21a7df0d..90112870 100644 --- a/Yi.Ai.Vue3/src/components/userPersonalCenter/components/APIKeyManagement.vue +++ b/Yi.Ai.Vue3/src/components/userPersonalCenter/components/APIKeyManagement.vue @@ -8,10 +8,19 @@ import { isUserVip } from '@/utils/user'; const apiKey = ref(''); const showKey = ref(false); -const loading = ref(false); +const loading = ref(true); const displayedKey = ref(''); const showSuccessDialog = ref(false); - +const svg = ` + + `; const isOpening = ref(false); const confettis = ref([]); const router = useRouter(); @@ -147,13 +156,21 @@ function generateConfetti() { setTimeout(() => confettis.value = [], 2000); } -onMounted(() => { - fetchApiKey(); +onMounted(async () => { + await fetchApiKey(); + loading.value = false; }); - + @@ -212,7 +229,7 @@ onMounted(() => { - + 重置密钥 @@ -220,53 +237,52 @@ onMounted(() => { - - - - - 使用说明 - - API地址:https://ai.ccnetcore.com - 密钥:上面申请的token - 模型:聊天界面显示的模型名称 - - - - - + + + + + 使用说明 + + API地址:https://ai.ccnetcore.com + 密钥:上面申请的token + 模型:聊天界面显示的模型名称 - - - - - - - - 恭喜您成功领取API密钥! - - - 请妥善保管您的密钥 - - - - - 确定 - - - + + + + + + + + + + + + 恭喜您成功领取API密钥! + + + 请妥善保管您的密钥 + + + + + 确定 + + +
@@ -220,53 +237,52 @@ onMounted(() => {
API地址:https://ai.ccnetcore.com
密钥:上面申请的token
模型:聊天界面显示的模型名称
- 恭喜您成功领取API密钥! -
- 请妥善保管您的密钥 -
+ 恭喜您成功领取API密钥! +
+ 请妥善保管您的密钥 +