<template>
  <view class="window-box">
    <view class="dis-flex flex-dir-column flex-x-center flex-y-center">
      <view class="logo">
        <image class="logo-image" src="/static/logo.png"/>
      </view>
      <view class="m-t-20 f-w-b p-b-50">{{ pD.name }}</view>
    </view>
  </view>
</template>

<script setup>
import {getCurrentInstance, inject, onActivated, onBeforeUnmount, onMounted, reactive, ref} from "vue";
import {onShow, onHide} from "@dcloudio/uni-app";
import {checkLogin, redirectTo} from "@/utils/app";

const pD = reactive({
  name: '体训助手',
})

// 挂载完成之后
onMounted(async (r) => {
  setTimeout(() => {
    let a = checkLogin(true)
    if (!a) {
      redirectTo('pages/index/init')
    } else {
      redirectTo('pages/index/index')
    }
  }, 2000)
})
// 激活页面时
onActivated(async () => {
})
</script>

<style lang="scss" scoped>
.window-box {
  background-color: #006bff;
  background-size: 100% auto;
  background-repeat: no-repeat;
  width: 100vw;
  height: 100vh;
  color: #fff;
  font-size: 43upx;
  display: flex;
  justify-content: center;
  align-items: center;

  .logo {
    width: 140upx;
    height: 140upx;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #cccccc50;
    border-radius: 50%;

    &-image {
      width: 90%;
      height: 90%;
      border-radius: 50%;
    }
  }
}
</style>
