<template>
  <ie-page :fix-height="true">
    <view class="flex-1 min-h-1 h-full flex items-center justify-center">
      <uv-image :src="imgLaunch" width="55vw" height="auto" mode="widthFix" bgColor="white" custom-class="-mt-300">
        <template #loading>
          <span></span>
        </template>
      </uv-image>
    </view>
  </ie-page>
</template>

<script lang="ts" setup>
import config from '@/config';
import { useAppStore } from '@/store/appStore';
import { useAppConfig } from '@/hooks/useAppConfig';
import { useUserStore } from '@/store/userStore';
import { useTransferPage } from '@/hooks/useTransferPage';
const appStore = useAppStore();
const userStore = useUserStore();
const { transferTo } = useTransferPage();
// #ifdef H5
uni.hideTabBar();
// #endif
const imgLaunch = computed(() => {
  return config.ossUrl + '/launch.png'
});
const handleLoad = () => {
  if (window.platform === 'wap2app') {
    window.webviewBridge.getStatusBarHeight().then(height => {
      appStore.statusBarHeight = height;
    });
  }
  // 执行初始化的操作：预加载字典、提前校验token是否有效等
  appStore.init().then(() => {
    setTimeout(() => {
      transferTo('/pagesMain/pages/index/index', {
        type: 'reLaunch'
      });
    }, 1200);
  });
};
onLoad(() => {
  handleLoad();
});
</script>

<style></style>
