<template></template>
<script setup lang="ts">
import { useWeAppAuthStore } from '@/common'
import { onShow } from '@dcloudio/uni-app'
import { getCurrentInstance } from 'vue'
import useUser from '@/common/libraries/userUserLogin'
onShow(async () => {
  uni.showLoading({
    title: '加载中...',
    mask: true
  })
  await getCurrentInstance()?.appContext.config.globalProperties.$onLaunched
  uni.hideLoading()
  if (useUser.getLoginStatus()) {
    uni.navigateTo({
      url: '/pages/index/index'
    })
  } else {
    uni.redirectTo({
      url: '/pages/login'
    })
  }
})
</script>
