任一存 2 лет назад
Родитель
Сommit
7419e5611b

+ 2 - 3
src/App.vue

@@ -13,9 +13,8 @@ export default {
     ])
   },
   mounted() {
-    const query = new URLSearchParams(location.href.split('?')[1])
-    api.getData(query.get('themeIdx')).then((res) => {
-      console.log('res: ', res)
+    api.getData().then((res) => {
+      console.log(res)
       this.setData(res)
     })
   },

+ 1 - 12
src/api.js

@@ -15,20 +15,9 @@ import axios from "axios"
 
 export default {
   getData(idx) {
-    let url = 'https://houseoss.4dkankan.com/project/yzdyh-h5/'
-    switch (idx) {
-    case '0': // 石碑
-      url += 'monument/monumentData.json'
-      break
-    case '1': // 舟辑
-      url += 'book-fair/bookFairData.json'
-      break
-    default:
-      break
-    }
     return axios({
       method: 'get',
-      url,
+      url: 'https://houseoss.4dkankan.com/project/yzdyh-h5/book-fair/bookFairData.json',
       headers: {
         "Content-Type": "application/json",
       },

BIN
src/assets/images/btn-return-1.png


BIN
src/assets/images/btn-return.png


src/assets/images/btn_start-1.png → src/assets/images/btn-start.png


BIN
src/assets/images/btn_start.png


BIN
src/assets/images/entry-arrow-0.png


src/assets/images/entry-arrow-1.png → src/assets/images/entry-arrow.png


BIN
src/assets/images/home-bg-1.jpg


BIN
src/assets/images/home-bg.jpg


BIN
src/assets/images/home-title.jpg


BIN
src/assets/images/relic-list-bg-1.jpg


BIN
src/assets/images/relic-list-bg.jpg


BIN
src/assets/images/tab-deco-left.png


BIN
src/assets/images/tab-deco-right.png


src/assets/images/title-deco-left-1.png → src/assets/images/title-deco-left.png


src/assets/images/title-deco-right-1.png → src/assets/images/title-deco-right.png


BIN
src/assets/images/title-deco.png


BIN
src/assets/images/unit-list-bg-1.jpg


BIN
src/assets/images/unit-list-bg.jpg


Разница между файлами не показана из-за своего большого размера
+ 0 - 1828
src/assets/images/中国大运河博物馆 线上图文展.html


Разница между файлами не показана из-за своего большого размера
+ 0 - 2018
src/assets/images/中国大运河博物馆 线上图文展_files/app.js.download


Разница между файлами не показана из-за своего большого размера
+ 0 - 2269
src/assets/images/中国大运河博物馆 线上图文展_files/chunk-vendors.js.download


+ 4 - 53
src/views/Home.vue

@@ -8,23 +8,7 @@
       class="logo"
     >
     <div
-      v-if="$route.query.themeIdx === '0'"
-      class="theme-0"
-    >
-      <img
-        src="@/assets/images/home-title.jpg"
-        alt=""
-        class="title"
-        draggable="false"
-      >
-      <button
-        class="begin"
-        @click="onClickBegin"
-      />
-    </div>
-    <div
-      v-if="$route.query.themeIdx === '1'"
-      class="theme-1"
+      class="wrap"
     >
       <img
         src="@/assets/images/home-title-1.png"
@@ -66,9 +50,6 @@ export default {
     onClickBegin() {
       this.$router.push({
         name: 'UnitList',
-        query: {
-          themeIdx: this.$route.query.themeIdx,
-        }
       })
     }
   },
@@ -87,7 +68,7 @@ export default {
     width: 364px;
     z-index: 3;
   }
-  >.theme-0{
+  >.wrap{
     position: absolute;
     left: 0;
     top: 0;
@@ -97,36 +78,6 @@ export default {
     background-size: cover;
     background-repeat: no-repeat;
     background-position: center center;
-    >img.title{
-      position: absolute;
-      top: 0;
-      left: 50%;
-      height: 100%;
-      transform: translateX(-50%);
-    }
-    >button.begin{
-      position: absolute;
-      bottom: 58px;
-      left: 50%;
-      transform: translateX(-50%);
-      width: 76px;
-      height: 79px;
-      background-image: url(@/assets/images/btn_start.png);
-      background-size: contain;
-      background-repeat: no-repeat;
-      background-position: center center;
-    }
-  }
-  >.theme-1{
-    position: absolute;
-    left: 0;
-    top: 0;
-    width: 100%;
-    height: 100%;
-    background-image: url(@/assets/images/home-bg-1.jpg);
-    background-size: cover;
-    background-repeat: no-repeat;
-    background-position: center center;
     >.title{
       position: absolute;
       top: calc(106 / 1080 * 100vh);
@@ -142,10 +93,10 @@ export default {
     >button.begin{
       position: absolute;
       bottom: 39px;
-      left: calc(837 / 1920 * 100vw);
+      right: calc(837 / 1920 * 100vw);
       width: 129px;
       height: 129px;
-      background-image: url(@/assets/images/btn_start-1.png);
+      background-image: url(@/assets/images/btn-start.png);
       background-size: cover;
       background-repeat: no-repeat;
       background-position: center center;

+ 9 - 9
src/views/RelicDetail.vue

@@ -14,7 +14,7 @@
           v-for="(item, index) in relicInfo?.imgs"
           :key="index"
           class="swiper-slide"
-          :src="'https://houseoss.4dkankan.com/project/yzdyh-h5/monument/' + item"
+          :src="'https://houseoss.4dkankan.com/project/yzdyh-h5/book-fair/' + item"
           alt=""
           draggable="false"
         >
@@ -91,10 +91,10 @@ onMounted(() => {
   background-position: center center;
   >button.return{
     position: absolute;
-    top: 47px;
-    left: 60px;
-    width: 64px;
-    height: 64px;
+    top: 40px;
+    left: 53px;
+    width: 92px;
+    height: 92px;
     background-image: url(@/assets/images/btn-return.png);
     background-size: contain;
     background-repeat: no-repeat;
@@ -104,7 +104,7 @@ onMounted(() => {
   >.swiper-root{
     width: 100%;
     height: 63.8%;
-    background: rgba(250, 246, 240, 1);
+    background: #fff;
     overflow: hidden;
     position: relative;
     >.swiper-button-prev{
@@ -162,7 +162,7 @@ onMounted(() => {
         font-size: 32px;
         font-family: Source Han Serif CN-Bold, Source Han Serif CN;
         font-weight: bold;
-        color: #404036;
+        color: #48768D;
         text-align: center;
         margin-bottom: 20px;
         overflow: hidden;
@@ -173,7 +173,7 @@ onMounted(() => {
         font-size: 20px;
         font-family: Source Han Sans CN-Regular, Source Han Sans CN;
         font-weight: 400;
-        color: #404036;
+        color: #48768D;
         margin-bottom: 35px;
         text-align: center;
       }
@@ -184,7 +184,7 @@ onMounted(() => {
           font-size: 22px;
           font-family: Source Han Sans CN-Regular, Source Han Sans CN;
           font-weight: 400;
-          color: #404036;
+          color: #48768D;
           line-height: 26px;
         }
       }

+ 62 - 110
src/views/RelicList.vue

@@ -1,15 +1,11 @@
 <template>
   <div
     class="relic-list"
-    :class="[`type-${$route.query.themeIdx}`]"
   >
     <button
       class="return"
       @click="router.push({
         name: 'UnitList',
-        query: {
-          themeIdx: route.query.themeIdx,
-        }
       })"
     />
     <div
@@ -25,7 +21,7 @@
         }"
         @click="onClickTabItem(idx)"
       >
-        {{ item.label }}
+        {{ int2zh(idx + 1) }} {{ item.label }}
       </button>
     </div>
     <div class="splitter" />
@@ -40,16 +36,14 @@
         @click="router.push({
           name:'RelicDetail',
           query: {
-            themeIdx: route.query.themeIdx,
             unitIdx: route.query.unitIdx,
             relicIdx: idx,
           }
         })"
       >
-        <!-- https://houseoss.4dkankan.com/project/yzdyh-h5/monument/beituo/1/0.png -->
         <img
           class="cover"
-          :src="'https://houseoss.4dkankan.com/project/yzdyh-h5/monument/' + item.imgs[0]"
+          :src="'https://houseoss.4dkankan.com/project/yzdyh-h5/book-fair/' + item.imgs[0]"
           alt=""
           draggable="false"
         >
@@ -73,6 +67,7 @@
 import { useRoute, useRouter } from "vue-router"
 import { ref, computed } from "vue"
 import { useStore } from "vuex"
+import { numberToWords } from "pixiu-number-toolkit"
 
 const route = useRoute()
 const router = useRouter()
@@ -96,11 +91,14 @@ function onClickTabItem(idx) {
   router.push({
     name: route.name,
     query: {
-      themeIdx: route.query.themeIdx,
       unitIdx: idx,
     }
   })
 }
+
+function int2zh(idx) {
+  return numberToWords(idx, "zh")
+}
 </script>
 
 <style lang="less" scoped>
@@ -117,125 +115,67 @@ function onClickTabItem(idx) {
   align-items: center;
   >button.return{
     position: absolute;
-    top: 47px;
-    left: 60px;
-    width: 64px;
-    height: 64px;
+    top: 40px;
+    left: 53px;
+    width: 92px;
+    height: 92px;
     background-image: url(@/assets/images/btn-return.png);
     background-size: contain;
     background-repeat: no-repeat;
     background-position: center center;
   }
   >.tabbar{
+    padding-left: 110px;
+    padding-right: 110px;
     flex: 0 0 auto;
     max-width: 100%;
     display: flex;
     align-items: center;
-    gap: 50px;
+    gap: 93px;
     overflow: auto;
     &::-webkit-scrollbar { height: 0; } /*宽度是对垂直滚动条而言,高度是对水平滚动条而言*/
+
     >button{
+
+      position: relative;
       flex: 0 0 auto;
-      width: 180px;
-      height: 70px;
-      background-image: url(@/assets/images/tab-item-normal.png);
-      background-size: contain;
-      background-repeat: no-repeat;
-      background-position: center center;
       font-size: 24px;
       font-family: KingHwa_OldSong-Regular, KingHwa_OldSong;
       font-weight: 400;
-      color: #7F0007;
+      color: #48768D;
       line-height: 28px;
     }
     >button.active{
-      background-image: url(@/assets/images/tab-item-active.png);
-      color: #fff;
-    }
-  }
-  >.splitter{
-    display: none;
-  }
-  >ul.relic-ul{
-    width: 100%;
-    display: flex;
-    align-items: center;
-    gap: 70px;
-    overflow: auto;
-    padding-bottom: 40px;
-    padding-left: 95px;
-    padding-right: 95px;
-    &::-webkit-scrollbar { height: 8px;}
-    &::-webkit-scrollbar-thumb { background: rgba(186, 172, 153, 1); border-radius: 4px; }
-    >li{
-      flex: 0 0 auto;
-      width: 473px;
-      height: 63.17vh;
-      cursor: pointer;
-      &:hover{
-        box-shadow: 6px 6px 10px 0px rgba(65,42,18,0.75);
-      }
-      >img{
-        width: 100%;
-        height: calc(100% - 141px);
-        object-fit: cover;
+      &::before{
+        content: '';
+        display: inline-block;
+        position: absolute;
+        left: -6px;
+        top: 50%;
+        transform: translate(-100%, -60%);
+        width: 50px;
+        height: 18px;
+        background-image: url(@/assets/images/tab-deco-left.png);
+        background-size: contain;
+        background-repeat: no-repeat;
+        background-position: center center;
       }
-      >.not-img{
-        height: 141px;
-        overflow: hidden;
-        padding-left: 10px;
-        padding-right: 10px;
-        >h3{
-          font-size: 32px;
-          font-family: Source Han Serif CN-Bold, Source Han Serif CN;
-          font-weight: bold;
-          color: #404036;
-          overflow: hidden;
-          white-space: pre;
-          text-overflow: ellipsis;
-          margin-top: 28px;
-          margin-bottom: 20px;
-        }
-        >.desc{
-          display: -webkit-box;
-          -webkit-box-orient: vertical;
-          -webkit-line-clamp: 2;
-          overflow: hidden;
-          font-size: 20px;
-          font-family: Source Han Sans CN-Regular, Source Han Sans CN;
-          font-weight: 400;
-          color: #404036;
-          line-height: 28px;
-        }
+      &::after{
+        content: '';
+        display: inline-block;
+        position: absolute;
+        right: -6px;
+        top: 50%;
+        transform: translate(100%, -60%);
+        width: 50px;
+        height: 18px;
+        background-image: url(@/assets/images/tab-deco-right.png);
+        background-size: contain;
+        background-repeat: no-repeat;
+        background-position: center center;
       }
     }
   }
-}
-
-.relic-list.type-1{
-  background-image: url(@/assets/images/relic-list-bg-1.jpg);
-  >button.return{
-    width: 92px;
-    height: 92px;
-    background-image: url(@/assets/images/btn-return-1.png);
-  }
-  >.tabbar{
-    gap: 50px;
-    &::-webkit-scrollbar {} /*宽度是对垂直滚动条而言,高度是对水平滚动条而言*/
-    >button{
-      flex: 0 0 auto;
-      width: 180px;
-      height: 70px;
-      background-image: url(@/assets/images/tab-item-normal.png);
-      background-size: contain;
-      background-repeat: no-repeat;
-      background-position: center center;
-      color: #48768D;
-    }
-    >button.active{
-      background-image: url(@/assets/images/tab-item-active.png);
-    }
-  }
   >.splitter{
     display: initial;
     width: calc(1794 / 1920 * 100vw);
@@ -252,19 +192,19 @@ function onClickTabItem(idx) {
     padding-left: 95px;
     padding-right: 95px;
     &::-webkit-scrollbar { height: 8px;}
-    &::-webkit-scrollbar-thumb { background: rgba(186, 172, 153, 1); border-radius: 4px; }
+    &::-webkit-scrollbar-thumb { background: rgba(138, 168, 204, 1); border-radius: 4px; }
     >li{
+      font-size: 0;
       flex: 0 0 auto;
       width: 473px;
       height: 63.17vh;
       cursor: pointer;
-      &:hover{
-        box-shadow: 6px 6px 10px 0px rgba(65,42,18,0.75);
-      }
       >img{
         width: 100%;
         height: calc(100% - 141px);
         object-fit: cover;
+        background-color: #fff;
+        object-fit: contain;
       }
       >.not-img{
         height: 141px;
@@ -275,7 +215,7 @@ function onClickTabItem(idx) {
           font-size: 32px;
           font-family: Source Han Serif CN-Bold, Source Han Serif CN;
           font-weight: bold;
-          color: #404036;
+          color: #48768D;
           overflow: hidden;
           white-space: pre;
           text-overflow: ellipsis;
@@ -290,10 +230,22 @@ function onClickTabItem(idx) {
           font-size: 20px;
           font-family: Source Han Sans CN-Regular, Source Han Sans CN;
           font-weight: 400;
-          color: #404036;
+          color: #48768D;
           line-height: 28px;
         }
       }
+      &:hover{
+        box-shadow: 6px 6px 14px 0px rgba(57,106,168,0.25);
+        >img{
+        }
+        >.not-img{
+          background-color: #fff;
+          >h3{
+          }
+          >.desc{
+          }
+        }
+      }
     }
   }
 }

+ 66 - 96
src/views/UnitList.vue

@@ -1,16 +1,17 @@
 <template>
   <div
     class="unit-list"
-    :class="[`type-${$route.query.themeIdx}`]"
   >
     <main>
-      <h3 class="foreword">
-        前言
-      </h3>
-      <div
-        class="foreword normal-txt"
-        v-html="data?.preface"
-      />
+      <div class="foreword-wrap">
+        <h3 class="foreword">
+          前言
+        </h3>
+        <div
+          class="foreword normal-txt"
+          v-html="data?.preface"
+        />
+      </div>
       <ul>
         <li
           v-for="(item, idx) in data?.list"
@@ -19,11 +20,10 @@
             name: 'RelicList',
             query: {
               unitIdx: idx,
-              themeIdx: $route.query.themeIdx,
             },
           })"
         >
-          <h3>第{{ int2zh(idx + 1) }}部分{{ item.label }}</h3>
+          <h3>第{{ int2zh(idx + 1) }}部分 {{ item.label }}</h3>
           <div
             class="normal-txt"
             v-html="item.info"
@@ -32,13 +32,22 @@
             藏品鉴赏
             <img
               class="arrow"
-              :src="require(`@/assets/images/entry-arrow-${$route.query.themeIdx}.png`)"
+              :src="require(`@/assets/images/entry-arrow.png`)"
               alt=""
               draggable="false"
             >
           </button>
         </li>
       </ul>
+      <dit class="conclusion">
+        <h3>
+          结语
+        </h3>
+        <div
+          class="normal-txt"
+          v-html="data?.epilogue"
+        />
+      </dit>
     </main>
   </div>
 </template>
@@ -73,9 +82,8 @@ export default {
   height: 100%;
   position: relative;
   background-image: url(@/assets/images/unit-list-bg.jpg);
-  background-size: cover;
-  background-repeat: no-repeat;
-  background-position: center center;
+  background-size: 100% auto;
+  background-repeat: no-repeat repeat;
   overflow: auto;
   &::-webkit-scrollbar { width: 0; } /*宽度是对垂直滚动条而言,高度是对水平滚动条而言*/
   h3{
@@ -97,93 +105,30 @@ export default {
     display: flex;
     flex-direction: column;
     align-items: center;
-    >h3.foreword{
-      margin-top: 46px;
-      margin-bottom: 32px;
-    }
-    >div.foreword{
-      margin-bottom: 90px;
+    padding-left: calc(140 / 1920 * 100vw);
+    padding-right: calc(152 / 1920 * 100vw);
+    >.foreword-wrap{
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      width: 100%;
+      >h3.foreword{
+        margin-top: 46px;
+        margin-bottom: 32px;
+      }
+      >div.foreword{
+        margin-bottom: 90px;
+      }
     }
     >ul{
+      width: 100%;
       >li{
         display: flex;
         flex-direction: column;
         align-items: center;
-        width: 76.4vw;
         cursor: pointer;
         margin-bottom: 10px;
-        &:hover{
-          box-shadow: 3px 6px 19px 0px rgba(61, 34, 3, 0.2);
-          >h3{
-            &::before{
-              content: '';
-              display: inline-block;
-              position: absolute;
-              left: -12px;
-              top: 50%;
-              transform: translate(-100%, -50%);
-              width: 38px;
-              height: 38px;
-              background-image: url(@/assets/images/title-deco.png);
-              background-size: contain;
-              background-repeat: no-repeat;
-              background-position: center center;
-            }
-          }
-          >.normal-txt{
-            margin-bottom: 33px;
-          }
-          >button.detail-entry{
-            display: flex;
-            justify-content: center;
-            align-items: center;
-            >img.arrow{
-              margin-left: 9px;
-            }
-          }
-        }
-        >h3{
-          position: relative;
-          margin-top: 42px;
-          margin-bottom: 32px;
-        }
-        >.normal-txt{
-          margin-bottom: 99px;
-        }
-        >button.detail-entry{
-          display: none;
-          width: 209px;
-          height: 48px;
-          background-image: url(@/assets/images/relic-list-page-entry-button-deco.png);
-          background-size: contain;
-          background-repeat: no-repeat;
-          background-position: center center;
-          margin-bottom: 18px;
-          font-size: 20px;
-          font-family: Source Han Serif CN-Bold, Source Han Serif CN;
-          font-weight: bold;
-          color: #7F0007;
-          line-height: 28px;
-        }
-      }
-    }
-  }
-}
-
-.unit-list.type-1{
-  background-image: url(@/assets/images/unit-list-bg-1.jpg);
-  &::-webkit-scrollbar { width: 0; } /*宽度是对垂直滚动条而言,高度是对水平滚动条而言*/
-  h3{
-  }
-  p{
-  }
-  >main{
-    >h3.foreword{
-    }
-    .normal-txt, :deep(p){
-    }
-    >ul{
-      >li{
+        width: 100%;
         &:hover{
           background-color: rgba(57, 106, 168, 0.55);
           >h3{
@@ -196,7 +141,7 @@ export default {
               transform: translate(-100%, -70%);
               width: 78px;
               height: 28px;
-              background-image: url(@/assets/images/title-deco-left-1.png);
+              background-image: url(@/assets/images/title-deco-left.png);
               background-size: contain;
               background-repeat: no-repeat;
               background-position: center center;
@@ -210,34 +155,59 @@ export default {
               transform: translate(100%, -70%);
               width: 78px;
               height: 28px;
-              background-image: url(@/assets/images/title-deco-right-1.png);
+              background-image: url(@/assets/images/title-deco-right.png);
               background-size: contain;
               background-repeat: no-repeat;
               background-position: center center;
             }
           }
           >.normal-txt{
+            margin-bottom: 33px;
           }
           >button.detail-entry{
             display: flex;
             justify-content: center;
             align-items: center;
             >img.arrow{
+              margin-left: 9px;
             }
           }
         }
         >h3{
+          position: relative;
+          margin-top: 42px;
+          margin-bottom: 32px;
         }
         >.normal-txt{
+          margin-bottom: 99px;
         }
         >button.detail-entry{
           display: none;
-          background-image: none;
+          width: 209px;
+          height: 48px;
+          margin-bottom: 18px;
+          font-size: 20px;
+          font-family: Source Han Serif CN-Bold, Source Han Serif CN;
+          font-weight: bold;
           color: #fff;
+          line-height: 28px;
           border: 1px dotted #fff;
         }
       }
     }
+    >.conclusion{
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      width: 100%;
+      >h3{
+        margin-top: 46px;
+        margin-bottom: 32px;
+      }
+      >div{
+        margin-bottom: 90px;
+      }
+    }
   }
 }
 </style>