123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209 |
- <template>
- <router-view v-slot="{ Component }">
- <transition name="fade-in-out">
- <component :is="Component" />
- </transition>
- </router-view>
- <audio
- id="bg-music"
- src="./configMultiMedia/music/music2.mp3"
- style="opacity: 0;"
- />
- </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%;
- position: relative;
- overflow: hidden;
- }
- // 字体
- @font-face {
- font-family: 'KingHwa_OldSong';
- src: url('@/assets/style/KingHwa_OldSong.TTF');
- }
- @font-face {
- font-family: 'KaiTi';
- src: url('@/assets/style/SIMKAI.woff2');
- }
- @font-face {
- font-family: 'Source Han Sans CN-Regular';
- src: url('@/assets/style/SOURCEHANSANSCN-REGULAR.OTF');
- }
- // 滚动条,只设置某一项可能导致不生效。
- // ::-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;
- }
- }
- // 不断渐变显隐,显示时间较长 animation
- .animation-show-long-hide {
- animation: show-long-hide 2.5s infinite;
- }
- @keyframes show-long-hide {
- 0% {
- opacity: 0;
- }
- 35% {
- opacity: 1;
- }
- 65% {
- opacity: 1;
- }
- 100% {
- opacity: 0;
- }
- }
- // // vue-viewer
- .viewer-backdrop {
- background-color: rgba(0, 0, 0, 90%) !important;
- }
- .viewer-backdrop-home {
- background-color: #597557 !important;
- backdrop-filter: blur(10px);
- }
- .big-tip {
- position: fixed;
- // width: 100px;
- bottom: 30px;
- left: 50%;
- transform: translateX(-50%);
- z-index: 2016;
- display: flex;
- align-items: center;
- font-size: calc(24 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
- line-height: calc(30 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
- font-family: KaiTi;
- color: white;
- transition: all 0.5s;
- >img{
- width: 30px;
- height: 30px;
- margin-left: 10px;
- }
- }
- .viewer-button-home{
- background: url(@/assets/images/icon_cancel.png);
- background-size: 100% 100%;
- background-color: rgba(0, 0, 0, 0) !important;
- height: 40px !important;
- right: 10px !important;
- top: 10px !important;
- width: 40px !important;
- border: none !important;
- -webkit-tap-highlight-color:none !important;
- }
- .viewer-button-home::before{
- display: none !important;
- }
- </style>
|