Ver código fonte

转手页样式细化

任一存 3 anos atrás
pai
commit
858c4c48ce
1 arquivos alterados com 40 adições e 4 exclusões
  1. 40 4
      src/views/ExhibitionDetailAnimation.vue

+ 40 - 4
src/views/ExhibitionDetailAnimation.vue

@@ -1,10 +1,13 @@
 <template>
 <template>
   <div class="root">
   <div class="root">
-    <h2>金色中国—中国古代金器大展</h2>
+    <h2 :class="$route.query.exhibitionType">
+      {{ title }}
+    </h2>
     <img
     <img
       v-for="index of 151"
       v-for="index of 151"
       v-show="index - 1 === currentFrameIdx || index - 1 === currentFrameIdx - 1"
       v-show="index - 1 === currentFrameIdx || index - 1 === currentFrameIdx - 1"
       :key="index"
       :key="index"
+      class="frame"
       :src="`${$publicPath}hand-rotate-frames/s/涂鸦手势${(index - 1).toString().padStart(4, '0')}.jpg`"
       :src="`${$publicPath}hand-rotate-frames/s/涂鸦手势${(index - 1).toString().padStart(4, '0')}.jpg`"
       alt=""
       alt=""
       @load="onImgLoad(index - 1)"
       @load="onImgLoad(index - 1)"
@@ -17,6 +20,11 @@
       type="spinner"
       type="spinner"
       size="3rem"
       size="3rem"
     />
     />
+    <img
+      class="background-image"
+      src="@/assets/image/bg-text.png"
+      alt="background"
+    >
   </div>
   </div>
 </template>
 </template>
 
 
@@ -35,6 +43,14 @@ export default {
       exhibitionData,
       exhibitionData,
     }
     }
   },
   },
+  computed: {
+    choosenExhibition() {
+      return this.exhibitionData[this.$route.query.exhibitionType][this.$route.query.exhibitionId]
+    },
+    title() {
+      return this.choosenExhibition.text.split('<br>').join('')
+    }
+  },
   mounted() {
   mounted() {
     this.intervalId = setInterval(() => {
     this.intervalId = setInterval(() => {
       if ((this.loadCountDown === 0) && (this.imgStateList[this.currentFrameIdx + 1] !== undefined)) {
       if ((this.loadCountDown === 0) && (this.imgStateList[this.currentFrameIdx + 1] !== undefined)) {
@@ -77,25 +93,45 @@ export default {
   width: 100%;
   width: 100%;
   height: 100%;
   height: 100%;
   overflow: hidden;
   overflow: hidden;
-  h2 {
+  > h2 {
     position: absolute;
     position: absolute;
     top: 2rem;
     top: 2rem;
     left: 50%;
     left: 50%;
     transform: translateX(-50%);
     transform: translateX(-50%);
     z-index: 1;
     z-index: 1;
+    font-weight: bold;
+    &.theme {
+      color: #18489D;
+    }
+    &.wuyiba {
+      color: #F15835;
+    }
+    &.traditionModern {
+      color: #2FB779;
+    }
   }
   }
-  img {
+  > .frame {
     position: absolute;
     position: absolute;
     height: 100%;
     height: 100%;
     top: 0;
     top: 0;
     left: 50%;
     left: 50%;
     transform: translateX(-50%);
     transform: translateX(-50%);
   }
   }
-  .loading {
+  > .loading {
     position: fixed;
     position: fixed;
     top: 50%;
     top: 50%;
     left: 50%;
     left: 50%;
     transform: translate(-50%, -50%);
     transform: translate(-50%, -50%);
   }
   }
+  > .background-image {
+    position: absolute;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    top: 0;
+    object-fit: cover;
+    width: 100%;
+    height: 100%;
+  }
 }
 }
 </style>
 </style>