<template>
    <view></view>
</template>

<script setup lang="ts">
import { onLoad } from '@dcloudio/uni-app'
import { setNextRoute } from '@/hooks/useRoleData'
import { useUserStore } from '@/stores/user'

const userStore = useUserStore()

onLoad(() => {
    if (userStore.isLogin) {
        // 已经登录 => 首页
        setNextRoute()
    } else {
        uni.navigateTo({
            url: '/bundle/pages/login/login'
        })
    }
})
</script>
<style scoped></style>
