App.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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. export default {
  20. mounted() {
  21. if (this.isMobile) {
  22. document.body.classList.add('mobile')
  23. }
  24. }
  25. }
  26. </script>
  27. <style lang="less">
  28. .vue-root{
  29. width: 100%;
  30. height: 100%;
  31. }
  32. /*横屏体验*/
  33. .orientation-tip {
  34. width: 100%;
  35. height: 100%;
  36. z-index: 10000;
  37. position: fixed;
  38. top: 0;
  39. left: 0;
  40. display: none;
  41. background-color: rgba(0, 0, 0, 0.8);
  42. > div {
  43. position: absolute;
  44. top: 50%;
  45. width: 100%;
  46. left: 50%;
  47. transform: translate(-50%, -50%);
  48. text-align: center;
  49. > img {
  50. width: 20%;
  51. }
  52. > p {
  53. font-size: 16px;
  54. margin-top: 20px;
  55. width: 100%;
  56. }
  57. }
  58. }
  59. /*竖屏*/
  60. @media screen and (orientation: portrait) {
  61. .orientation-tip {
  62. display: none;
  63. }
  64. }
  65. /*横屏*/
  66. @media screen and (orientation: landscape) {
  67. .orientation-tip {
  68. display: block;
  69. }
  70. }
  71. // vue组件过渡效果
  72. .fade-out-leave-active {
  73. transition: opacity 1s;
  74. }
  75. .fade-out-leave-to {
  76. opacity: 0;
  77. }
  78. @font-face {
  79. font-family: 'DFLiShuW7';
  80. src: url('@/assets/style/DFLiShuW7.ttf');
  81. }
  82. .cad{
  83. top: 24px !important;
  84. right: 26px !important;
  85. width: 222px !important;
  86. height: 222px !important;
  87. border-radius: 10px;
  88. z-index: 999;
  89. background: rgba(81, 32, 32, 0.40) !important;
  90. backdrop-filter: blur(0.9vw);
  91. border: 1px solid #D8B275;
  92. svg {
  93. path {
  94. stroke-width: 1px;
  95. }
  96. }
  97. }
  98. .mobile {
  99. .cad{
  100. top: 4.7vw !important;
  101. right: 3.9vw !important;
  102. width: 24.9vw !important;
  103. height: 24vw !important;
  104. border-radius: 0.9vw;
  105. }
  106. }
  107. .mobile[view-mode='floor-plain'], .mobile[view-mode='doll-house'], .mobile[view-mode='transitioning'] {
  108. .cad {
  109. // display: none;
  110. }
  111. }
  112. .hotspot-detail-open {
  113. .cad {
  114. display: none;
  115. }
  116. }
  117. // 小地图 当前位置标志
  118. // 位置圆圈。默认半径2.69,圆圈粗细1.076
  119. #ele1 circle {
  120. fill: rgb(163, 51, 40);
  121. r: 2px;
  122. }
  123. // 视野
  124. #ele1 path {
  125. fill: rgba(163, 51, 40, 0.7);
  126. }
  127. #popup {
  128. background: rgba(0, 0, 0, 0.7);
  129. }
  130. #closepop {
  131. display: initial;
  132. }
  133. .element-ui-loading {
  134. z-index: 9999 !important;
  135. }
  136. </style>