App.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. globalApi.checkLoginStatusAndProcess()
  26. },
  27. methods: {
  28. }
  29. }
  30. </script>
  31. <style lang="less">
  32. .vue-root{
  33. width: 100%;
  34. height: 100%;
  35. }
  36. /*横屏体验*/
  37. .orientation-tip {
  38. width: 100%;
  39. height: 100%;
  40. z-index: 10000;
  41. position: fixed;
  42. top: 0;
  43. left: 0;
  44. display: none;
  45. background-color: rgba(0, 0, 0, 0.8);
  46. > div {
  47. position: absolute;
  48. top: 50%;
  49. width: 100%;
  50. left: 50%;
  51. transform: translate(-50%, -50%);
  52. text-align: center;
  53. > img {
  54. width: 20%;
  55. }
  56. > p {
  57. font-size: 16px;
  58. margin-top: 20px;
  59. width: 100%;
  60. }
  61. }
  62. }
  63. /*竖屏*/
  64. @media screen and (orientation: portrait) {
  65. .orientation-tip {
  66. display: none;
  67. }
  68. }
  69. /*横屏*/
  70. @media screen and (orientation: landscape) {
  71. .orientation-tip {
  72. display: block;
  73. }
  74. }
  75. // vue组件过渡效果
  76. .fade-out-leave-active {
  77. transition: opacity 1s;
  78. }
  79. .fade-out-leave-to {
  80. opacity: 0;
  81. }
  82. @font-face {
  83. font-family: 'LiSu-Regular';
  84. src: url('@/assets/style/LiSu.ttf');
  85. }
  86. .cad {
  87. top: 52px !important;
  88. right: 29px !important;
  89. width: 219px !important;
  90. height: 149px !important;
  91. border-radius: 4px;
  92. z-index: 999;
  93. background: rgba(255, 168, 149, 0.2) !important;
  94. svg {
  95. path {
  96. stroke-width: 0.5;
  97. }
  98. }
  99. }
  100. .mobile {
  101. .cad {
  102. top: 31px !important;
  103. right: 15px !important;
  104. width: 124px !important;
  105. height: 85px !important;
  106. border-radius: 2px;
  107. }
  108. }
  109. .mobile[view-mode='floor-plain'], .mobile[view-mode='doll-house'], .mobile[view-mode='transitioning'] {
  110. .cad {
  111. // display: none;
  112. }
  113. }
  114. .hotspot-detail-open {
  115. .cad {
  116. display: none;
  117. }
  118. }
  119. // 小地图 当前位置标志
  120. // 位置圆圈。默认半径2.69,圆圈粗细1.076
  121. #ele1 circle {
  122. fill: #A10E0C;
  123. r: 1.2;
  124. stroke-width: 0.3;
  125. stroke: rgba;
  126. }
  127. // 视野
  128. #ele1 path {
  129. fill: rgba(161, 14, 12, 0.7);
  130. stroke-width: 0.3;
  131. stroke: #fff;
  132. }
  133. #popup {
  134. background: rgba(0, 0, 0, 0.7);
  135. }
  136. .el-message-box__wrapper {
  137. z-index: 20003 !important;
  138. }
  139. </style>