24 lines
478 B
Vue
24 lines
478 B
Vue
<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>
|