<script>
import { useUserStoreWithOut } from '@/store/modules/user'
export default {
  onLaunch: function () {
    const userStore = useUserStoreWithOut()
    if (userStore.isLogin) {
      userStore.fetchUserInfo()
    }
    // #ifdef APP-PLUS
    if (userStore.isLogin) {
      plus.navigator.closeSplashscreen()
    } else {
      uni.reLaunch({
        url: '/pages/login/index',
        success: () => {
          plus.navigator.closeSplashscreen()
        },
      })
    }
    // #endif
  },
  onShow: function () {
    console.log('App Show')
  },
  onHide: function () {
    console.log('App Hide')
  },
}
</script>

<style lang="scss">
@import '@/static/css/index.scss';
@import '@climblee/uv-ui/index.scss';
</style>
