<template>
  <router-view />
</template>

<script setup>
import { ref, computed, watch, onMounted } from "vue"
import { useRoute, useRouter } from "vue-router"
import { useStore } from "vuex"
import {
// checkLoginStatusAndProcess,
// getUserFromStorageIfNeed
} from '@/api.js'

const route = useRoute()
const router = useRouter()
const store = useStore()

// store.commit('getPageVisitRecordFromStorage')
// checkLoginStatusAndProcess()
// getUserFromStorageIfNeed()

// if (store.state.loginStatus === store.getters.loginStatusEnum.notLogin && route.name !== 'LoginView') {
//   router.push({
//     name: 'LoginView',
//     query: {
//       redirect: encodeURI(route.fullPath)
//     }
//   })
// }

</script>

<style lang="less">
html, body {
  // overscroll-behavior: none;
  overflow: hidden;
  height: 100%;
}

* {
  user-select: none;
  -webkit-touch-callout: none;
}

// 360浏览器不支持not()
input, textarea {
  user-select: initial;
}

#app {
  height: 100%;
}

// 字体
@font-face {
  font-family: 'KingHwa_OldSong';
  src: url('@/assets/style/KingHwa_OldSong.TTF');
}
@font-face {
  font-family: 'KaiTi';
  src: url('@/assets/style/SIMKAI.TTF');
}
// i {
//   font-style: italic;
// }

// 滚动条，只设置某一项可能导致不生效。
// ::-webkit-scrollbar { background: #dddecc; width: 6px; height: 6px; }
// ::-webkit-scrollbar-thumb { background: #828a5b; border-radius: 3px; }
// ::-webkit-scrollbar-corner { background: #dddecc; }

// vue组件过渡效果
.fade-out-leave-active {
  transition: opacity 2s;
  pointer-events: none;
}
.fade-out-leave-to {
  opacity: 0;
}

.fade-in-enter-active {
  transition: opacity 2s;
}
.fade-in-enter-from {
  opacity: 0;
}

.fade-in-out-enter-active {
  transition: opacity 1s;
}
.fade-in-out-leave-active {
  transition: opacity 1s;
  pointer-events: none;
}
.fade-in-out-enter-from {
  opacity: 0;
}
.fade-in-out-leave-to {
  opacity: 0;
}

// 不断渐变显隐 animation
.animation-show-hide {
  animation: show-hide 1.5s infinite;
}
@keyframes show-hide {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

// // vue-viewer
// .viewer-container {
//   background-color: rgba(0, 0, 0, 80%) !important;
// }
// 或者
// .viewer-backdrop {
//   background-color: rgba(0, 0, 0, 90%) !important;
// }
</style>