App.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <template>
  2. <iframe class="ifr" id="ifr" :src="`program/index.html?token=${token}`" frameborder="0"></iframe>
  3. <router-view class="fix-root" :userInfo="userInfo" />
  4. <template v-if="!$route.meta.outoflist">
  5. <Vmenu @clickIntro="isShowIntro = true" />
  6. <div @click="isShowIntegralDetail = true" class="integral-area">
  7. <img :src="`${config.cdn_url}images/icon_integral.png`" alt="">
  8. <span>积分:{{ point }}</span>
  9. </div>
  10. </template>
  11. <teleport to='#app'>
  12. <Transition>
  13. <Introduce v-if="isShowIntro" @close="isShowIntro = false" />
  14. </Transition>
  15. <Transition>
  16. <IntegralDetail v-if="isShowIntegralDetail" @close="isShowIntegralDetail = false" />
  17. </Transition>
  18. </teleport>
  19. </template>
  20. <script setup>
  21. import Vmenu from "@/components/Vmenu.vue";
  22. import Introduce from "@/components/Introduce.vue";
  23. import IntegralDetail from '@/components/Integral-detail.vue'
  24. import { ref, onMounted, reactive } from 'vue'
  25. import http from '@/api/http.js'
  26. import utils from '@/utils/index.js'
  27. let token = utils.getQueryByName('token')
  28. const isShowIntro = ref(false)
  29. const isShowIntegralDetail = ref(false)
  30. const point = ref(0)
  31. let userInfo = reactive({})
  32. const root = document.documentElement;
  33. root.style.setProperty('--bgImage', `url(${config.cdn_url}images/background.jpg)`);
  34. onMounted(async () => {
  35. let result = (await http.get('cms/wxUser/getUserInfo')).data;
  36. let info = result.data
  37. userInfo = info
  38. point.value = info.point
  39. })
  40. </script>
  41. <style lang="scss">
  42. @import "@/assets/style/reset.css";
  43. @import "@/assets/style/my-reset.css";
  44. html,
  45. body {
  46. height: 100%;
  47. overscroll-behavior: none;
  48. overflow: hidden;
  49. }
  50. #app {
  51. font-family: Avenir, Helvetica, Arial, sans-serif;
  52. -webkit-font-smoothing: antialiased;
  53. -moz-osx-font-smoothing: grayscale;
  54. width: 100%;
  55. height: 100%;
  56. position: relative;
  57. background-image: var(--bgImage);
  58. background-size: cover;
  59. background-repeat: no-repeat;
  60. background-position: center bottom;
  61. .integral-area {
  62. position: absolute;
  63. right: 0;
  64. bottom: 40px;
  65. background: linear-gradient(270deg, #C1A97A 0%, rgba(193, 169, 122, 0) 100%);
  66. display: flex;
  67. align-items: center;
  68. padding: 0 20px 0 50px;
  69. z-index: 9;
  70. >span {
  71. color: #fff;
  72. margin-left: 10px;
  73. font-size: 14px;
  74. }
  75. }
  76. .ifr {
  77. width: 100%;
  78. height: 100%;
  79. position: fixed;
  80. left: 0%;
  81. top: 0;
  82. }
  83. .fix-root {
  84. pointer-events: none;
  85. * {
  86. pointer-events: auto;
  87. }
  88. }
  89. }
  90. * {
  91. user-select: none;
  92. -webkit-touch-callout: none;
  93. }
  94. /* 垃圾360浏览器不支持not() */
  95. input,
  96. textarea {
  97. user-select: initial;
  98. }
  99. ::-webkit-scrollbar {
  100. background: rgba(193, 169, 122, 0.5);
  101. width: 0.3rem;
  102. height: 0.3rem;
  103. }
  104. /*宽度是对垂直滚动条而言,高度是对水平滚动条而言*/
  105. ::-webkit-scrollbar-thumb {
  106. background: #fff;
  107. border-radius: 0.15rem;
  108. }
  109. ::-webkit-scrollbar-corner {
  110. background: rgba(193, 169, 122, 0.5);
  111. }
  112. .fade-out-leave-active {
  113. transition: opacity 1s;
  114. }
  115. .fade-out-leave-to {
  116. opacity: 0;
  117. }
  118. .animation-show-hide {
  119. animation: show-hide 1.8s infinite;
  120. }
  121. @keyframes show-hide {
  122. 0% {
  123. opacity: 0;
  124. }
  125. 50% {
  126. opacity: 1;
  127. }
  128. 100% {
  129. opacity: 0;
  130. }
  131. }
  132. i {
  133. font-style: italic;
  134. }
  135. .viewer-container {
  136. background-color: rgba(0, 0, 0, 80%) !important;
  137. }
  138. .v-enter-active,
  139. .v-leave-active {
  140. transition: opacity 0.5s ease;
  141. }
  142. .v-enter-from,
  143. .v-leave-to {
  144. opacity: 0;
  145. }
  146. </style>