diff --git a/src/views/LoadingView.vue b/src/views/LoadingView.vue index 37d278f..8580b25 100644 --- a/src/views/LoadingView.vue +++ b/src/views/LoadingView.vue @@ -2,17 +2,17 @@
- +
- +
@@ -21,13 +21,13 @@
- +

{{ loadingText }}

{{ subText }}

- +
@@ -36,10 +36,10 @@ {{ Math.round(progress) }}%
- +
@@ -78,16 +78,16 @@ const startLoading = async () => { if (isInApp()) { await connectToApp() } - + // 开始进度动画 startProgressAnimation() - + // 等待加载完成 await waitForLoadingComplete() - + // 跳转到目标页面 await navigateToTargetPage() - + } catch (error) { console.error('Loading failed:', error) // 出错时跳转到错误页面 @@ -101,7 +101,7 @@ const connectToApp = async () => { connectApplication(async (access) => { try { const result = parseAccessOrigin(access) - + if (result.success) { const headerInfo = parseHeader(result.data) await setHttpHeaders(headerInfo) @@ -122,16 +122,16 @@ const startProgressAnimation = () => { let currentProgress = 0 const totalDuration = loadingSteps.reduce((sum, step) => sum + step.duration, 0) const progressIncrement = 100 / totalDuration * 50 // 每50ms增加的进度 - + progressInterval = setInterval(() => { currentProgress += progressIncrement progress.value = Math.min(currentProgress, 100) - + if (progress.value >= 100) { clearInterval(progressInterval) } }, 50) - + // 更新步骤文本 updateLoadingStep() } @@ -142,7 +142,7 @@ const updateLoadingStep = () => { const step = loadingSteps[currentStepIndex] loadingText.value = step.text subText.value = step.subText - + stepTimeout = setTimeout(() => { currentStepIndex++ updateLoadingStep() @@ -163,13 +163,13 @@ const navigateToTargetPage = async () => { try { // 尝试获取用户信息来判断跳转目标 const response = await getTeamEntry() - + if (response && response.status && response.body) { // 有团队信息,根据默认设置跳转到主页 const memberProfile = response.body.memberProfile if (memberProfile) { setUserInfo(memberProfile, response.body.teamProfile) - + // 根据用户身份跳转到对应页面 // 这里可以根据需要调整默认跳转逻辑 router.replace('/host-center') @@ -231,7 +231,7 @@ onUnmounted(() => { left: 0; right: 0; bottom: 0; - background: + background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.15) 0%, transparent 50%), radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.1) 0%, transparent 50%); @@ -399,20 +399,20 @@ onUnmounted(() => { .loading-content { max-width: 280px; } - + .logo-icon { font-size: 50px; } - + .logo-text { font-size: 28px; } - + .spinner { width: 50px; height: 50px; } - + .main-text { font-size: 16px; }