123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <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>
|