showCollection.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <template>
  2. <div>
  3. <div class="ui-body">
  4. <div class="ui-con" @click.stop>
  5. <div class="img-con img-k">
  6. <img
  7. @click.stop="$hideBroadcast()"
  8. :src="require(`@/assets/images/close.png`)"
  9. alt
  10. />
  11. <div class="show-detail">
  12. <div
  13. class="collection-item"
  14. :style="{ background: $linear[item.bgid] }"
  15. >
  16. <img :src="item.imgstr" alt="" />
  17. </div>
  18. <div class="show-info">
  19. <h3>{{ item.name }}</h3>
  20. <p v-if="item.time">年代:{{ item.time }}</p>
  21. <p v-if="item.size">尺寸:{{ item.size }}</p>
  22. <div v-if="item.describe" class="desc">{{ item.describe }}</div>
  23. <div class="qrcode" v-if="activeItem && activeItem.qrcode">
  24. <img
  25. :src="`${$cdn}/images/qrcode/${activeItem.qrcode}.png`"
  26. alt=""
  27. />
  28. <span>了解更多故事</span>
  29. </div>
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. </div>
  35. </div>
  36. </template>
  37. <script>
  38. export default {
  39. props: ["item"],
  40. data() {
  41. return {
  42. activeItem: null,
  43. };
  44. },
  45. watch: {},
  46. mounted() {},
  47. };
  48. </script>
  49. <style lang="less" scoped>
  50. @import "../assets/style/globalVars.less";
  51. .ui-body {
  52. top: 50%;
  53. left: 50%;
  54. transform: translate(-50%, -50%);
  55. position: relative;
  56. z-index: 9999999;
  57. max-width: 70%;
  58. .ui-con {
  59. text-align: center;
  60. font-size: 0;
  61. width: 100%;
  62. height: 82vh;
  63. box-sizing: border-box;
  64. overflow: hidden;
  65. .img-con {
  66. height: 100%;
  67. font-size: 0;
  68. .show-detail {
  69. height: 100%;
  70. width: 100%;
  71. background: #fff;
  72. display: flex;
  73. align-items: flex-start;
  74. .collection-item {
  75. width: 60%;
  76. height: 100%;
  77. margin-right: 1.67rem;
  78. background: #403f3d;
  79. position: relative;
  80. > img {
  81. width: 80%;
  82. transform: translate(-50%, -50%);
  83. position: absolute;
  84. top: 50%;
  85. left: 50%;
  86. margin-top: 0;
  87. }
  88. }
  89. .close {
  90. position: absolute;
  91. top: 0.83rem;
  92. right: 0.83rem;
  93. width: 1.67rem;
  94. cursor: pointer;
  95. }
  96. .show-info {
  97. padding-top: 1.67rem;
  98. padding-right: 1.67rem;
  99. color: #444444;
  100. text-align: left;
  101. width: 40%;
  102. > h3 {
  103. color: #df3b2f;
  104. font-size: 1.67rem;
  105. max-width: 22.92rem;
  106. margin-bottom: 1.25rem;
  107. }
  108. > p {
  109. line-height: 1.42rem;
  110. font-size: 0.83rem;
  111. }
  112. .qrcode {
  113. position: absolute;
  114. right: 0.83rem;
  115. bottom: 0.42rem;
  116. text-align: center;
  117. > img {
  118. width: 2.92rem;
  119. }
  120. > span {
  121. display: block;
  122. font-size: 0.67rem;
  123. }
  124. }
  125. .desc {
  126. border-top: 0.04rem solid #d1d1d1;
  127. margin-top: 1.25rem;
  128. padding-top: 1.25rem;
  129. font-size: 0.83rem;
  130. }
  131. }
  132. }
  133. > img:not(.img) {
  134. width: 2.08rem;
  135. height: 2.08rem;
  136. position: absolute;
  137. z-index: 999;
  138. right: 0rem;
  139. top: -2.5rem;
  140. cursor: pointer;
  141. &:last-child {
  142. top: unset;
  143. bottom: 2.25rem;
  144. }
  145. }
  146. }
  147. iframe,
  148. video {
  149. width: 100%;
  150. min-height: 22.92rem;
  151. }
  152. img {
  153. width: 100%;
  154. height: auto;
  155. }
  156. }
  157. .ui-name {
  158. text-align: center;
  159. color: #fff;
  160. letter-spacing: 0.08rem;
  161. margin-top: 0.83rem;
  162. }
  163. }
  164. .full {
  165. width: 100%;
  166. height: 100%;
  167. z-index: 99999999;
  168. position: relative;
  169. iframe,
  170. video {
  171. width: 100%;
  172. height: 100%;
  173. }
  174. .img {
  175. height: 100%;
  176. position: absolute;
  177. left: 50%;
  178. top: 50%;
  179. transform: translate(-50%, -50%);
  180. }
  181. .full-btn {
  182. width: 1.25rem;
  183. position: absolute;
  184. right: 0.5rem;
  185. top: 1.25rem;
  186. cursor: pointer;
  187. }
  188. }
  189. </style>