ThreeDetail.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <template>
  2. <div class="two-hp">
  3. <div class="content">
  4. <img class="bg" :src="popImg" alt="">
  5. <div class="inner">
  6. <div class="left">
  7. <video ref="video$" muted autoplay :poster="videoPostImg" class="initial-video" playsinline="true"
  8. x5-playsinline="true" webkit-playsinline="true"
  9. src="https://culture.4dage.com/demo/gaoxinqu/source/videos/video.mp4" @mousedown.passive.stop
  10. @touchstart.passive.stop @wheel.passive.stop />
  11. </div>
  12. <div class="right">
  13. <h2>明蓝釉女陶侍俑</h2>
  14. <p>年代:汉朝 </p>
  15. <p>尺寸:长19,宽17.5,高33厘米</p>
  16. <swiper class="dir-body" :modules="modules" :space-between="10" :scrollbar="{ draggable: true }"
  17. :freeMode="true" :slides-per-view="'auto'" :observer="true" :mousewheel="true">
  18. <swiper-slide v-for="item in 5" :key="item.id">
  19. <div class="db-slide" @click="showIfr = true">
  20. <img src="https://4dscene.4dage.com/culturalrelics/FJBWG/images/fj01.jpg" alt="">
  21. </div>
  22. </swiper-slide>
  23. </swiper>
  24. </div>
  25. </div>
  26. <img class="close" @click="$emit('close')" :src="closeImg" alt="">
  27. </div>
  28. <Transition>
  29. <div class="ifrcontent" v-if="showIfr">
  30. <div class="title">明蓝釉女陶侍俑</div>
  31. <iframe src="https://4dscene.4dage.com/culturalrelics/FJBWG/Model2.html?m=fj01" frameborder="0"></iframe>
  32. <img class="close" @click="showIfr = false" :src="close_thin" alt="">
  33. </div>
  34. </Transition>
  35. </div>
  36. </template>
  37. <script setup>
  38. import { ref } from "vue"
  39. import { Grid, FreeMode, Mousewheel } from 'swiper';
  40. import { Swiper, SwiperSlide } from 'swiper/vue';
  41. import 'swiper/css';
  42. import 'swiper/css/grid';
  43. import 'swiper/css/free-mode';
  44. import 'swiper/css/mousewheel';
  45. const popImg = utils.getImageUrl(`hp_bg.jpg`)
  46. const closeImg = utils.getImageUrl(`close.png`)
  47. const close_thin = utils.getImageUrl(`close_thin.png`)
  48. const showIfr = ref(false)
  49. const modules = [Grid, FreeMode, Mousewheel]
  50. </script>
  51. <style lang="less" scoped>
  52. .two-hp {
  53. position: fixed;
  54. top: 0;
  55. z-index: 999;
  56. left: 0;
  57. bottom: 0;
  58. right: 0;
  59. width: 100%;
  60. height: 100%;
  61. background: rgba(190, 180, 166, 0.8);
  62. backdrop-filter: blur(20px);
  63. .content,
  64. .ifrcontent {
  65. position: absolute;
  66. left: 50%;
  67. top: 50%;
  68. transform: translate(-50%, -50%);
  69. width: 70%;
  70. border-radius: 10px;
  71. overflow: hidden;
  72. .inner {
  73. display: flex;
  74. position: absolute;
  75. left: 0;
  76. top: 0;
  77. bottom: 0;
  78. right: 0;
  79. width: 100%;
  80. height: 100%;
  81. display: flex;
  82. align-items: center;
  83. padding: 0 30px;
  84. .left {
  85. width: 60%;
  86. flex-shrink: 0;
  87. padding: 10px;
  88. border: 3px solid #83796F;
  89. >video {
  90. width: 100%;
  91. }
  92. }
  93. .right {
  94. padding-left: 30px;
  95. width: 33%;
  96. box-sizing: border-box;
  97. >h2 {
  98. color: #911927;
  99. font-size: 30px;
  100. line-height: 1.5;
  101. margin-bottom: 10px;
  102. }
  103. >p {
  104. font-size: 26px;
  105. color: #7A6553;
  106. line-height: 1.5;
  107. }
  108. .dir-body {
  109. position: relative;
  110. margin-top: 40%;
  111. .swiper-wrapper {
  112. width: 100%;
  113. .swiper-slide {
  114. width: 50%;
  115. border-radius: 5px;
  116. overflow: hidden;
  117. .db-slide {
  118. width: 100%;
  119. cursor: pointer;
  120. >img {
  121. width: 100%;
  122. }
  123. }
  124. }
  125. }
  126. }
  127. }
  128. }
  129. .bg {
  130. width: 100%;
  131. }
  132. .close {
  133. position: absolute;
  134. right: 20px;
  135. top: 20px;
  136. z-index: 99;
  137. cursor: pointer;
  138. width: 50px;
  139. }
  140. }
  141. .ifrcontent {
  142. z-index: 1;
  143. width: 80%;
  144. height: 80%;
  145. background: rgba(0, 0, 0, 0.5);
  146. .title {
  147. position: absolute;
  148. left: 20px;
  149. color: #fff;
  150. line-height: 45px;
  151. height: 45px;
  152. padding: 0 40px 0 20px;
  153. top: 20px;
  154. z-index: 99;
  155. background-image: linear-gradient(90deg, #911927, rgba(145, 25, 39, 0));
  156. }
  157. >iframe {
  158. width: 100%;
  159. height: 100%;
  160. }
  161. .close {
  162. width: 40px;
  163. }
  164. }
  165. }</style>