App.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <div class="vue-root">
  3. <router-view />
  4. <div
  5. v-if="isMobile"
  6. class="orientation-tip"
  7. >
  8. <div>
  9. <img
  10. :src="require('@/assets/images/landtip.png')"
  11. alt=""
  12. >
  13. <p>请在竖屏模式观看</p>
  14. </div>
  15. </div>
  16. </div>
  17. </template>
  18. <script>
  19. import '@/assets/style/reset.less'
  20. export default {
  21. mounted() {
  22. if (this.isMobile) {
  23. document.body.classList.add('mobile')
  24. }
  25. }
  26. }
  27. </script>
  28. <style lang="less">
  29. .vue-root{
  30. width: 100%;
  31. height: 100%;
  32. }
  33. /*横屏体验*/
  34. .orientation-tip {
  35. width: 100%;
  36. height: 100%;
  37. z-index: 10000;
  38. position: fixed;
  39. top: 0;
  40. left: 0;
  41. display: none;
  42. background-color: rgba(0, 0, 0, 0.8);
  43. > div {
  44. position: absolute;
  45. top: 50%;
  46. width: 100%;
  47. left: 50%;
  48. transform: translate(-50%, -50%);
  49. text-align: center;
  50. > img {
  51. width: 20%;
  52. }
  53. > p {
  54. font-size: 16px;
  55. margin-top: 20px;
  56. width: 100%;
  57. }
  58. }
  59. }
  60. /*竖屏*/
  61. @media screen and (orientation: portrait) {
  62. .orientation-tip {
  63. display: none;
  64. }
  65. }
  66. /*横屏*/
  67. @media screen and (orientation: landscape) {
  68. .orientation-tip {
  69. display: block;
  70. }
  71. }
  72. // vue组件过渡效果
  73. .fade-out-leave-active {
  74. transition: opacity 1s;
  75. }
  76. .fade-out-leave-to {
  77. opacity: 0;
  78. }
  79. @font-face {
  80. font-family: 'DFLiShuW7';
  81. src: url('@/assets/style/DFLiShuW7.ttf');
  82. }
  83. .mobile {
  84. .cad {
  85. top: 8vw !important;
  86. right: 3.6vw !important;
  87. width: 35vw !important;
  88. height: 35vw !important;
  89. border-radius: 0.9vw;
  90. z-index: 999;
  91. background: rgba(21, 52, 115, 0.80) !important;
  92. backdrop-filter: blur(1.8vw);
  93. border: 1px solid #94E1FF;
  94. svg {
  95. path {
  96. stroke-width: 0.5;
  97. }
  98. }
  99. }
  100. }
  101. .mobile[view-mode='floor-plain'], .mobile[view-mode='doll-house'], .mobile[view-mode='transitioning'] {
  102. .cad {
  103. // display: none;
  104. }
  105. }
  106. .hotspot-detail-open {
  107. .cad {
  108. display: none;
  109. }
  110. }
  111. // 小地图 当前位置标志
  112. // 位置圆圈。默认半径2.69,圆圈粗细1.076
  113. #ele1 circle {
  114. fill: #00a0e6;
  115. stroke: #fff;
  116. }
  117. // 视野
  118. #ele1 path {
  119. fill: #00a0e6;
  120. stroke: #fff;
  121. opacity: 0.7;
  122. }
  123. #popup {
  124. background-color: rgba(21, 52, 115, 0.80);
  125. backdrop-filter: blur(1.8vw);
  126. z-index: 10006;
  127. }
  128. </style>