index.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <div class="home">
  3. <div v-if="popupVisible" class="popup">
  4. <template v-if="!isMobile">
  5. <img class="logo" src="../../assets/images/logo.png" />
  6. <PCMain>
  7. <Button @click="popupVisible = false" />
  8. </PCMain>
  9. </template>
  10. <MobileMain v-else>
  11. <Button @click="popupVisible = false" />
  12. </MobileMain>
  13. </div>
  14. <iframe
  15. frameborder="0"
  16. style="width: 100vw; height: 100vh"
  17. src="https://www.4dkankan.com/panorama/show.html?id=WK1690972675209461760&vr=fd720_zIVqMoAJr&lang=zh"
  18. />
  19. </div>
  20. </template>
  21. <script setup lang="ts">
  22. import { ref } from "vue";
  23. import PCMain from "./PCMain.vue";
  24. import MobileMain from "./MobileMain.vue";
  25. import Button from "./components/CButton/index.vue";
  26. const isMobile = ref(
  27. navigator.userAgent.match(
  28. /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
  29. )
  30. );
  31. const popupVisible = ref(true);
  32. </script>
  33. <style lang="scss">
  34. .popup {
  35. position: absolute;
  36. top: 0;
  37. left: 0;
  38. right: 0;
  39. bottom: 0;
  40. background: rgba(255, 252, 247, 0.8);
  41. z-index: 999;
  42. }
  43. .logo {
  44. position: absolute;
  45. top: 31px;
  46. left: 33px;
  47. width: 132px;
  48. height: 94px;
  49. z-index: 1;
  50. }
  51. </style>