App.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <template>
  2. <router-view v-slot="{ Component }">
  3. <transition name="fade-in-out">
  4. <component :is="Component" />
  5. </transition>
  6. </router-view>
  7. <audio
  8. id="bg-music"
  9. src="./configMultiMedia/music/music2.mp3"
  10. style="opacity: 0;"
  11. />
  12. </template>
  13. <script setup>
  14. import { ref, computed, watch, onMounted } from "vue"
  15. import { useRoute, useRouter } from "vue-router"
  16. import { useStore } from "vuex"
  17. import {
  18. // checkLoginStatusAndProcess,
  19. // getUserFromStorageIfNeed
  20. } from '@/api.js'
  21. const route = useRoute()
  22. const router = useRouter()
  23. const store = useStore()
  24. // store.commit('getPageVisitRecordFromStorage')
  25. // checkLoginStatusAndProcess()
  26. // getUserFromStorageIfNeed()
  27. // if (store.state.loginStatus === store.getters.loginStatusEnum.notLogin && route.name !== 'LoginView') {
  28. // router.push({
  29. // name: 'LoginView',
  30. // query: {
  31. // redirect: encodeURI(route.fullPath)
  32. // }
  33. // })
  34. // }
  35. </script>
  36. <style lang="less">
  37. html,
  38. body {
  39. // overscroll-behavior: none;
  40. overflow: hidden;
  41. height: 100%;
  42. }
  43. * {
  44. user-select: none;
  45. -webkit-touch-callout: none;
  46. }
  47. // 360浏览器不支持not()
  48. input,
  49. textarea {
  50. user-select: initial;
  51. }
  52. #app {
  53. height: 100%;
  54. position: relative;
  55. overflow: hidden;
  56. }
  57. // 字体
  58. @font-face {
  59. font-family: 'KingHwa_OldSong';
  60. src: url('@/assets/style/KingHwa_OldSong.TTF');
  61. }
  62. @font-face {
  63. font-family: 'KaiTi';
  64. src: url('@/assets/style/SIMKAI.woff2');
  65. }
  66. @font-face {
  67. font-family: 'Source Han Sans CN-Regular';
  68. src: url('@/assets/style/SOURCEHANSANSCN-REGULAR.OTF');
  69. }
  70. // 滚动条,只设置某一项可能导致不生效。
  71. // ::-webkit-scrollbar { background: #dddecc; width: 6px; height: 6px; }
  72. // ::-webkit-scrollbar-thumb { background: #828a5b; border-radius: 3px; }
  73. // ::-webkit-scrollbar-corner { background: #dddecc; }
  74. // vue组件过渡效果
  75. .fade-out-leave-active {
  76. transition: opacity 2s;
  77. pointer-events: none;
  78. }
  79. .fade-out-leave-to {
  80. opacity: 0;
  81. }
  82. .fade-in-enter-active {
  83. transition: opacity 2s;
  84. }
  85. .fade-in-enter-from {
  86. opacity: 0;
  87. }
  88. .fade-in-out-enter-active {
  89. transition: opacity 1s;
  90. }
  91. .fade-in-out-leave-active {
  92. transition: opacity 1s;
  93. pointer-events: none;
  94. }
  95. .fade-in-out-enter-from {
  96. opacity: 0;
  97. }
  98. .fade-in-out-leave-to {
  99. opacity: 0;
  100. }
  101. // 不断渐变显隐 animation
  102. .animation-show-hide {
  103. animation: show-hide 1.5s infinite;
  104. }
  105. @keyframes show-hide {
  106. 0% {
  107. opacity: 0;
  108. }
  109. 50% {
  110. opacity: 1;
  111. }
  112. 100% {
  113. opacity: 0;
  114. }
  115. }
  116. // 不断渐变显隐,显示时间较长 animation
  117. .animation-show-long-hide {
  118. animation: show-long-hide 2.5s infinite;
  119. }
  120. @keyframes show-long-hide {
  121. 0% {
  122. opacity: 0;
  123. }
  124. 35% {
  125. opacity: 1;
  126. }
  127. 65% {
  128. opacity: 1;
  129. }
  130. 100% {
  131. opacity: 0;
  132. }
  133. }
  134. // // vue-viewer
  135. .viewer-backdrop {
  136. background-color: rgba(0, 0, 0, 90%) !important;
  137. }
  138. .viewer-backdrop-home {
  139. background-color: #597557 !important;
  140. backdrop-filter: blur(10px);
  141. }
  142. .big-tip {
  143. position: fixed;
  144. // width: 100px;
  145. bottom: 30px;
  146. left: 50%;
  147. transform: translateX(-50%);
  148. z-index: 2016;
  149. display: flex;
  150. align-items: center;
  151. font-size: calc(24 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  152. line-height: calc(30 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  153. font-family: KaiTi;
  154. color: white;
  155. transition: all 0.5s;
  156. >img{
  157. width: 30px;
  158. height: 30px;
  159. margin-left: 10px;
  160. }
  161. }
  162. .viewer-button-home{
  163. background: url(@/assets/images/icon_cancel.png);
  164. background-size: 100% 100%;
  165. background-color: rgba(0, 0, 0, 0) !important;
  166. height: 40px !important;
  167. right: 10px !important;
  168. top: 10px !important;
  169. width: 40px !important;
  170. border: none !important;
  171. -webkit-tap-highlight-color:none !important;
  172. }
  173. .viewer-button-home::before{
  174. display: none !important;
  175. }
  176. </style>