Files
yunzerwebsiteallinone/uniapp/pages/index/index.vue
T
2026-10-31 19:17:37 +08:00

39 lines
855 B
Vue

<template>
<view class="boot">
<image class="boot-logo" src="/static/logo.png" mode="aspectFit"></image>
<text class="boot-text">正在进入…</text>
</view>
</template>
<script>
import { onShow } from '@dcloudio/uni-app'
import { isLoggedIn } from '@/utils/auth.js'
/**
* 启动跳板页:若启动入口指向本页(脚手架默认首页),先做登录检测再分流,
* 未登录直接进登录页,已登录进首页(pages/nav/nav)。
*/
onShow(() => {
uni.reLaunch({ url: isLoggedIn() ? '/pages/nav/nav' : '/pages/login/login' })
})
</script>
<style>
.boot {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
}
.boot-logo {
width: 180rpx;
height: 180rpx;
margin-bottom: 32rpx;
}
.boot-text {
font-size: 28rpx;
color: #8f8f94;
}
</style>