UnitList.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <div class="unit-list">
  3. <main>
  4. <h3 class="foreword">
  5. 前言
  6. </h3>
  7. <p class="foreword">
  8. {{ data?.preface }}
  9. </p>
  10. <ul>
  11. <li
  12. v-for="(item, idx) in data?.list"
  13. :key="item.id"
  14. @click="$router.push({
  15. name: 'RelicList',
  16. query: {
  17. unitIdx: idx,
  18. },
  19. })"
  20. >
  21. <h3>{{ item.label }}</h3>
  22. <p>{{ item.info }}</p>
  23. <button class="detail-entry">
  24. 藏品鉴赏
  25. <img
  26. class="arrow"
  27. src="@/assets/images/red-arrow-right.png"
  28. alt=""
  29. draggable="false"
  30. >
  31. </button>
  32. </li>
  33. </ul>
  34. </main>
  35. </div>
  36. </template>
  37. <script>
  38. import { mapState } from "vuex"
  39. export default {
  40. data() {
  41. return {
  42. isExpand: false,
  43. }
  44. },
  45. computed: {
  46. ...mapState([
  47. 'data'
  48. ])
  49. },
  50. mounted() {
  51. console.log(this.data, 'dskfjslkfj')
  52. },
  53. methods: {
  54. },
  55. }
  56. </script>
  57. <style lang="less" scoped>
  58. .unit-list{
  59. height: 100%;
  60. position: relative;
  61. background-image: url(@/assets/images/unit-list-bg.jpg);
  62. background-size: cover;
  63. background-repeat: no-repeat;
  64. background-position: center center;
  65. overflow: auto;
  66. &::-webkit-scrollbar { width: 0; } /*宽度是对垂直滚动条而言,高度是对水平滚动条而言*/
  67. h3{
  68. font-size: 30px;
  69. font-family: KingHwa_OldSong-Regular, KingHwa_OldSong;
  70. font-weight: 400;
  71. color: #404036;
  72. }
  73. p{
  74. font-size: 16px;
  75. font-family: KingHwa_OldSong-Regular, KingHwa_OldSong;
  76. font-weight: 400;
  77. color: #404036;
  78. line-height: 28px;
  79. width: 73.6vw;
  80. text-indent: 2em;
  81. }
  82. >main{
  83. display: flex;
  84. flex-direction: column;
  85. align-items: center;
  86. >h3.foreword{
  87. margin-top: 46px;
  88. margin-bottom: 32px;
  89. }
  90. >p.foreword{
  91. margin-bottom: 90px;
  92. }
  93. >ul{
  94. >li{
  95. display: flex;
  96. flex-direction: column;
  97. align-items: center;
  98. width: 76.4vw;
  99. cursor: pointer;
  100. margin-bottom: 10px;
  101. &:hover{
  102. box-shadow: 3px 6px 19px 0px rgba(61, 34, 3, 0.2);
  103. >h3{
  104. &::before{
  105. content: '';
  106. display: inline-block;
  107. position: absolute;
  108. left: -12px;
  109. top: 50%;
  110. transform: translate(-100%, -50%);
  111. width: 38px;
  112. height: 38px;
  113. background-image: url(@/assets/images/title-deco.png);
  114. background-size: contain;
  115. background-repeat: no-repeat;
  116. background-position: center center;
  117. }
  118. }
  119. >p{
  120. margin-bottom: 33px;
  121. }
  122. >button.detail-entry{
  123. display: flex;
  124. justify-content: center;
  125. align-items: center;
  126. >img.arrow{
  127. margin-left: 9px;
  128. }
  129. }
  130. }
  131. >h3{
  132. position: relative;
  133. margin-top: 42px;
  134. margin-bottom: 32px;
  135. }
  136. >p{
  137. margin-bottom: 99px;
  138. }
  139. >button.detail-entry{
  140. display: none;
  141. width: 209px;
  142. height: 48px;
  143. background-image: url(@/assets/images/relic-list-page-entry-button-deco.png);
  144. background-size: contain;
  145. background-repeat: no-repeat;
  146. background-position: center center;
  147. margin-bottom: 18px;
  148. font-size: 20px;
  149. font-family: Source Han Serif CN-Bold, Source Han Serif CN;
  150. font-weight: bold;
  151. color: #7F0007;
  152. line-height: 28px;
  153. }
  154. }
  155. }
  156. }
  157. }
  158. </style>