优化启动页

This commit is contained in:
zhouyanli
2026-08-17 15:31:17 +08:00
parent 9d5310e4a7
commit cb885dc1f2
8 changed files with 88 additions and 24 deletions

View File

@@ -1,6 +1,7 @@
<template>
<view class="guide-page" v-if="!token">
<view class="status-bar"></view>
<view class="guide-page">
<template v-if="!token">
<view class="status-bar"></view>
<!-- 引导内容滑动容器 -->
<swiper
class="guide-swiper"
@@ -67,11 +68,13 @@
{{ currentStep === 2 ? '立即体验' : '下一步' }}
</button>
</view>
</template>
</view>
</template>
<script setup>
import { ref } from 'vue';
import { onReady } from '@dcloudio/uni-app';
// ========== 已登录直接进首页,跳过引导页 ==========
const token = uni.getStorageSync('token');
@@ -81,6 +84,15 @@ if (token) {
});
}
// 引导页渲染完成后关闭启动屏(仅未登录;已登录由首页 onReady 关闭)
onReady(() => {
if (!token) {
// #ifdef APP-PLUS
plus.navigator.closeSplashscreen()
// #endif
}
});
// ========== 响应式数据 ==========
// 当前引导步骤(0/1/2)
const currentStep = ref(0);