fix: 加载优化、vip状态优化、apikey优化

This commit is contained in:
Gsh
2025-08-04 23:11:42 +08:00
parent 0a2710b865
commit 65d5f5ae86
11 changed files with 172 additions and 93 deletions

View File

@@ -17,9 +17,27 @@ const designStore = useDesignStore();
/** 获取布局格式 */
const layout = computed((): LayoutType => designStore.layout);
onMounted(() => {
console.log('111--');
// 通知 index.html 的 loading 动画进度拉满并淡出
(window as any)?.finishLoading();
// 更好的做法是等待所有资源加载
window.addEventListener('load', () => {
const loader = document.getElementById('yixinai-loader');
if (loader) {
loader.style.opacity = '0';
setTimeout(() => {
loader.style.display = 'none';
}, 500); // 匹配过渡时间
}
});
// 设置超时作为兜底
setTimeout(() => {
const loader = document.getElementById('yixinai-loader');
if (loader) {
loader.style.opacity = '0';
setTimeout(() => {
loader.style.display = 'none';
}, 500);
}
}, 500); // 最多显示0.5秒
});
</script>