EntryList.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <template>
  2. <div class="entry-list">
  3. <ul>
  4. <li
  5. v-for="(item, index) in entryList"
  6. :key="index"
  7. @click="onClickEntry(item)"
  8. >
  9. <img
  10. class=""
  11. :src="item.bgImgUrl"
  12. alt=""
  13. draggable="false"
  14. >
  15. <span>{{ item.title }}</span>
  16. </li>
  17. </ul>
  18. <button
  19. class="close"
  20. @click="onClickClose"
  21. >
  22. <img
  23. class=""
  24. src="@/assets/images/close.png"
  25. alt=""
  26. draggable="false"
  27. >
  28. </button>
  29. </div>
  30. </template>
  31. <script>
  32. export default {
  33. data() {
  34. return {
  35. entryList: [
  36. {
  37. bgImgUrl: require('@/assets/images/entries/wen-wu-ting.png'),
  38. title: '文物厅',
  39. sceneCode: '1264',
  40. },
  41. {
  42. bgImgUrl: require('@/assets/images/entries/shu-fa-ting.png'),
  43. title: '书法厅',
  44. sceneCode: '1264',
  45. },
  46. {
  47. bgImgUrl: require('@/assets/images/entries/ge-lao-zu.png'),
  48. title: '仡佬族文化厅',
  49. sceneCode: '1264',
  50. },
  51. {
  52. bgImgUrl: require('@/assets/images/entries/30-zhou-nian.png'),
  53. title: '30周年成就展',
  54. sceneCode: '1264',
  55. },
  56. {
  57. bgImgUrl: require('@/assets/images/entries/di-biao-he-ying.png'),
  58. title: '地标合影',
  59. routeName: 'groupPhoto',
  60. },
  61. {
  62. bgImgUrl: require('@/assets/images/entries/wen-wu-shang-xi.png'),
  63. title: '文物赏析',
  64. routeName: 'RelicsList',
  65. },
  66. ]
  67. }
  68. },
  69. methods: {
  70. onClickClose() {
  71. this.$emit('close')
  72. },
  73. onClickEntry(entry) {
  74. if (entry.sceneCode) {
  75. this.$router.push({
  76. name: 'Home',
  77. query: {
  78. ...this.$route.query,
  79. ...{
  80. m: entry.sceneCode,
  81. }
  82. }
  83. })
  84. location.reload()
  85. } else {
  86. this.$router.push({
  87. name: entry.routeName
  88. })
  89. }
  90. }
  91. }
  92. }
  93. </script>
  94. <style lang="less" scoped>
  95. .entry-list {
  96. position: absolute;
  97. left: 0;
  98. top: 0;
  99. right: 0;
  100. bottom: 0;
  101. background: rgba(248, 241, 235, 0.90);
  102. backdrop-filter: blur(1.8vw);
  103. > ul {
  104. position: absolute;
  105. left: 0;
  106. top: 0;
  107. width: 100%;
  108. height: 100%;
  109. padding-top: 10.6vw;
  110. padding-left: 4.9vw;
  111. overflow: auto;
  112. > li {
  113. margin-right: 3.2vw;
  114. margin-bottom: 5.3vw;
  115. display: inline-flex;
  116. flex-direction: column;
  117. align-items: center;
  118. > img {
  119. width: 43.6vw;
  120. height: 32vw;
  121. margin-bottom: 2.7vw;
  122. }
  123. > span {
  124. font-size: 3.6vw;
  125. font-family: Source Han Sans CN-Regular, Source Han Sans CN;
  126. font-weight: 400;
  127. color: #666666;
  128. }
  129. }
  130. }
  131. > button.close {
  132. position: fixed;
  133. width: 13.3vw;
  134. height: 13.3vw;
  135. left: 50%;
  136. bottom: 5vh;
  137. transform: translateX(-50%);
  138. > img {
  139. width: 100%;
  140. height: 100%;
  141. }
  142. }
  143. }
  144. </style>