shaogen1995 před 3 roky
rodič
revize
beabd83abe

+ 2 - 0
webM/src/main.js

@@ -19,6 +19,8 @@ Vue.use(Lazyload,{
 import VueTouch from 'vue-touch'
 Vue.use(VueTouch, {name: 'v-touch'})
 
+
+
 Vue.config.productionTip = false
 
 new Vue({

+ 4 - 2
webM/src/router/index.js

@@ -301,8 +301,10 @@ const router = new VueRouter({
 // 导航守卫,回到页面顶部
 router.beforeEach((to, from, next) => {
   setTimeout(() => {
-    let dom = document.querySelector('.Layout')
-    dom.scrollTop = 0
+    if (!to.meta.sroolBack) {
+      let dom = document.querySelector('.Layout')
+      dom.scrollTop = 0
+    }
   }, 100);
   next()
 })

+ 8 - 6
webM/src/views/Collections/Detail.vue

@@ -3,7 +3,7 @@
     <div class="main">
       <img :src="`/data/Collections/${data.url}/big${data.id}.png`" alt="" />
       <div class="txt">
-        <h3>{{data.h3}}</h3>
+        <h3 v-html="data.h3"></h3>
         <div v-html="data.info"></div>
       </div>
     </div>
@@ -61,24 +61,26 @@ export default {
     }
     .txt {
       padding: 20px 20px 40px;
-      background: url('../../assets/img/Collections/bgCD.png');
+      background: url("../../assets/img/Collections/bgCD.png");
       background-size: 100% 100%;
       & > h3 {
         padding: 0 0 0 30px;
         font-size: 22px;
         font-weight: 700;
         padding-left: 30px;
-        background: url("../../assets/img/Layout/chosen.png") left 4px
-          no-repeat;
+        background: url("../../assets/img/Layout/chosen.png") left 4px no-repeat;
         background-size: 22px 18px;
         margin-bottom: 20px;
       }
-      /deep/ p{
-        color: #6A6A6A;
+      /deep/ p {
+        color: #6a6a6a;
         font-size: 16px;
         line-height: 18px;
         margin-bottom: 15px;
       }
+      /deep/ i {
+        font-style: italic;
+      }
     }
   }
 }

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 59 - 59
webM/src/views/Collections/data.js


+ 12 - 1
webM/src/views/Collections/index.vue

@@ -86,11 +86,22 @@ export default {
   //方法集合
   methods: {
     skip(path) {
+      // 记录点击的滚动距离
+      let dom = document.querySelector(".Layout");
+      this.$route.meta.sroolBack = dom.scrollTop;
+
       this.$router.push(path).catch(() => {});
     },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
-  created() {},
+  created() {
+    if (this.$route.meta.sroolBack) {
+      let dom = document.querySelector(".Layout");
+      setTimeout(() => {
+        dom.scrollTo({ top: this.$route.meta.sroolBack });
+      }, 200);
+    }
+  },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {},
   beforeCreate() {}, //生命周期 - 创建之前

+ 11 - 0
webM/src/views/Collections/info.vue

@@ -50,6 +50,10 @@ export default {
   //方法集合
   methods: {
     skip(id) {
+      // 记录点击的滚动距离
+      let dom = document.querySelector(".Layout");
+      this.$route.meta.sroolBack = dom.scrollTop;
+
       this.$router.push({
         name: "CollectionsDetail",
         query: { id, k: this.img },
@@ -74,6 +78,13 @@ export default {
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
     this.dataChange();
+
+    if (this.$route.meta.sroolBack) {
+      let dom = document.querySelector(".Layout");
+      setTimeout(() => {
+        dom.scrollTo({ top: this.$route.meta.sroolBack });
+      }, 200);
+    }
   },
   beforeCreate() {}, //生命周期 - 创建之前
   beforeMount() {}, //生命周期 - 挂载之前

+ 4 - 0
webM/src/views/Exhibitions/Detail.vue

@@ -349,6 +349,10 @@ export default {
             line-height: 18px;
             margin-bottom: 15px;
           }
+          /deep/.one{
+            font-weight: 700;
+            line-height: 40px;
+          }
         }
       }
     }

+ 11 - 0
webM/src/views/Exhibitions/Overseas.vue

@@ -32,6 +32,10 @@ export default {
   //方法集合
   methods: {
     toInfo(id) {
+      // 记录点击的滚动距离
+      let dom = document.querySelector(".Layout");
+      this.$route.meta.sroolBack = dom.scrollTop;
+
       this.$router.push({
         name: "ExDetail",
         query: { id, k: 4 },
@@ -41,6 +45,13 @@ export default {
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
     this.data = Overseas;
+
+    if (this.$route.meta.sroolBack) {
+      let dom = document.querySelector(".Layout");
+      setTimeout(() => {
+        dom.scrollTo({ top: this.$route.meta.sroolBack });
+      }, 200);
+    }
   },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {},

+ 11 - 0
webM/src/views/Exhibitions/Past.vue

@@ -32,6 +32,10 @@ export default {
   //方法集合
   methods: {
     toInfo(id) {
+      // 记录点击的滚动距离
+      let dom = document.querySelector(".Layout");
+      this.$route.meta.sroolBack = dom.scrollTop;
+
       this.$router.push({
         name: "ExDetail",
         query: { id, k: 3 },
@@ -41,6 +45,13 @@ export default {
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
     this.data = Past;
+    
+    if (this.$route.meta.sroolBack) {
+      let dom = document.querySelector(".Layout");
+      setTimeout(() => {
+        dom.scrollTo({ top: this.$route.meta.sroolBack });
+      }, 200);
+    }
   },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {},

+ 11 - 0
webM/src/views/Exhibitions/Permanent.vue

@@ -32,6 +32,10 @@ export default {
   //方法集合
   methods: {
     toInfo(id) {
+      // 记录点击的滚动距离
+      let dom = document.querySelector(".Layout");
+      this.$route.meta.sroolBack = dom.scrollTop;
+
       this.$router.push({
         name: "ExDetail",
         query: { id, k: 2 },
@@ -41,6 +45,13 @@ export default {
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
     this.data = Permanent;
+
+    if (this.$route.meta.sroolBack) {
+      let dom = document.querySelector(".Layout");
+      setTimeout(() => {
+        dom.scrollTo({ top: this.$route.meta.sroolBack });
+      }, 200);
+    }
   },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {},

+ 15 - 7
webM/src/views/Layout/index.vue

@@ -65,7 +65,7 @@
               {{ item.name }}
               <van-icon
                 :name="menaSon === index ? 'arrow-down' : 'arrow'"
-                @click.stop="oneMeanChange(index,item.show)"
+                @click.stop="oneMeanChange(index, item.show)"
               />
               <!-- <van-icon name="arrow-down" /> -->
             </div>
@@ -280,8 +280,8 @@ export default {
   //方法集合
   methods: {
     // 一级菜单箭头的展开和收起
-    oneMeanChange(index,show) {
-      if(show.includes(this.$route.meta.myTitle)) return
+    oneMeanChange(index, show) {
+      if (show.includes(this.$route.meta.myTitle)) return;
       if (this.menaSon === index) this.menaSon = null;
       else this.menaSon = index;
     },
@@ -673,9 +673,17 @@ export default {
   }
 }
 @media screen and (min-width: 620px) {
-    .Layout .toTop{
-      left: 50%;
-      transform: translateX(260px);
-    }
+  .Layout .toTop {
+    left: 50%;
+    transform: translateX(260px);
+  }
+}
+@media screen and (max-width: 360px) {
+  .rowSon {
+    font-size: 14px !important;
+  }
+  .link > span {
+    font-size: 12px;
+  }
 }
 </style>

+ 23 - 7
webM/src/views/Learn/Adults.vue

@@ -1,11 +1,16 @@
 <template>
   <div class="LearnAdults">
     <div class="main">
-      <div class="row" @click="skip(item.id)" v-for="(item, index) in data" :key="index">
+      <div
+        class="row"
+        @click="skip(item.id)"
+        v-for="(item, index) in data"
+        :key="index"
+      >
         <img v-lazy="`/data/LearnEngage/sm/${item.id}.png`" alt="" />
         <div class="txt" v-if="item.info">
-          <h3>{{item.info.title}}</h3>
-          <p>Date:{{item.info.time}}</p>
+          <h3>{{ item.info.title }}</h3>
+          <p>Date:{{ item.info.time }}</p>
         </div>
       </div>
     </div>
@@ -29,7 +34,11 @@ export default {
   watch: {},
   //方法集合
   methods: {
-        skip(id) {
+    skip(id) {
+      // 记录点击的滚动距离
+      let dom = document.querySelector(".Layout");
+      this.$route.meta.sroolBack = dom.scrollTop;
+
       this.$router.push({
         name: "LearnInfo",
         query: { id, k: "Adults" },
@@ -41,6 +50,13 @@ export default {
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
     this.data = LearnEngage.Adults;
+
+    if (this.$route.meta.sroolBack) {
+      let dom = document.querySelector(".Layout");
+      setTimeout(() => {
+        dom.scrollTo({ top: this.$route.meta.sroolBack });
+      }, 200);
+    }
   },
   beforeCreate() {}, //生命周期 - 创建之前
   beforeMount() {}, //生命周期 - 挂载之前
@@ -67,12 +83,12 @@ export default {
       & > img {
         width: 100%;
       }
-      .txt{
+      .txt {
         padding: 15px;
-        &>h3{
+        & > h3 {
           font-size: 16px;
         }
-        &>p{
+        & > p {
           font-size: 14px;
           color: #999;
         }

+ 23 - 7
webM/src/views/Learn/Families.vue

@@ -1,11 +1,16 @@
 <template>
   <div class="LearnFamilies">
     <div class="main">
-      <div class="row" @click="skip(item.id)" v-for="(item, index) in data" :key="index">
+      <div
+        class="row"
+        @click="skip(item.id)"
+        v-for="(item, index) in data"
+        :key="index"
+      >
         <img v-lazy="`/data/LearnEngage/sm/${item.id}.png`" alt="" />
         <div class="txt" v-if="item.info">
-          <h3>{{item.info.title}}</h3>
-          <p>Date:{{item.info.time}}</p>
+          <h3>{{ item.info.title }}</h3>
+          <p>Date:{{ item.info.time }}</p>
         </div>
       </div>
     </div>
@@ -29,7 +34,11 @@ export default {
   watch: {},
   //方法集合
   methods: {
-        skip(id) {
+    skip(id) {
+      // 记录点击的滚动距离
+      let dom = document.querySelector(".Layout");
+      this.$route.meta.sroolBack = dom.scrollTop;
+
       this.$router.push({
         name: "LearnInfo",
         query: { id, k: "Families" },
@@ -41,6 +50,13 @@ export default {
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
     this.data = LearnEngage.Families;
+
+    if (this.$route.meta.sroolBack) {
+      let dom = document.querySelector(".Layout");
+      setTimeout(() => {
+        dom.scrollTo({ top: this.$route.meta.sroolBack });
+      }, 200);
+    }
   },
   beforeCreate() {}, //生命周期 - 创建之前
   beforeMount() {}, //生命周期 - 挂载之前
@@ -67,12 +83,12 @@ export default {
       & > img {
         width: 100%;
       }
-      .txt{
+      .txt {
         padding: 15px;
-        &>h3{
+        & > h3 {
           font-size: 16px;
         }
-        &>p{
+        & > p {
           font-size: 14px;
           color: #999;
         }

+ 11 - 0
webM/src/views/Learn/Students.vue

@@ -35,6 +35,10 @@ export default {
   //方法集合
   methods: {
     skip(id) {
+      // 记录点击的滚动距离
+      let dom = document.querySelector(".Layout");
+      this.$route.meta.sroolBack = dom.scrollTop;
+
       this.$router.push({
         name: "LearnInfo",
         query: { id, k: "Students" },
@@ -46,6 +50,13 @@ export default {
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
     this.data = LearnEngage.Students;
+    
+    if (this.$route.meta.sroolBack) {
+      let dom = document.querySelector(".Layout");
+      setTimeout(() => {
+        dom.scrollTo({ top: this.$route.meta.sroolBack });
+      }, 200);
+    }
   },
   beforeCreate() {}, //生命周期 - 创建之前
   beforeMount() {}, //生命周期 - 挂载之前

+ 8 - 5
webM/src/views/Publications/Catalogues.vue

@@ -96,15 +96,18 @@ export default {
         }
         this.info = this.imgList[this.infoInd];
         dom.style.opacity = 1;
+        // 存储页码
+        this.$route.meta.pageSize = this.infoInd;
       }, 300);
     },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
-  created() {
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    if (this.$route.meta.pageSize) this.infoInd = this.$route.meta.pageSize;
     this.info = this.imgList[this.infoInd];
   },
-  //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {},
   beforeCreate() {}, //生命周期 - 创建之前
   beforeMount() {}, //生命周期 - 挂载之前
   beforeUpdate() {}, //生命周期 - 更新之前
@@ -125,7 +128,7 @@ export default {
     transition: all 0.3s;
     .page {
       z-index: 990;
-      background-color: rgba(183, 149, 80, .3);
+      background-color: rgba(183, 149, 80, 0.3);
       width: 68px;
       height: 40px;
       text-align: center;
@@ -148,7 +151,7 @@ export default {
       background-color: #fff;
       box-shadow: 0px 1px 4px 3px #ccc;
       & > img {
-        touch-action: pan-y!important;
+        touch-action: pan-y !important;
         border-radius: 8px;
         width: 100%;
         height: 100%;

+ 26 - 21
webM/src/views/Publications/Magazines.vue

@@ -149,7 +149,7 @@
       <div class="xian">
         <div
           class="xian_son"
-          @click="dateInd = item"
+          @click="cutAge(item)"
           :class="{ active: item === dateInd }"
           v-for="item in dateData"
           :key="item"
@@ -203,15 +203,18 @@ export default {
   //监听属性 类似于data概念
   computed: {},
   //监控data中的数据变化
-  watch: {
-    dateInd(val) {
-      this.imgList = Magazines[val];
+  watch: {},
+  //方法集合
+  methods: {
+    // 切换年份
+    cutAge(age) {
+      this.dateInd = age;
+      this.imgList = Magazines[age];
       this.infoInd = 0;
       this.info = this.imgList[this.infoInd];
+
+      this.$route.meta.pageAge = age;
     },
-  },
-  //方法集合
-  methods: {
     toInfo(id) {
       this.$router.push({
         name: "PublicationsInfo",
@@ -234,30 +237,32 @@ export default {
         }
         this.info = this.imgList[this.infoInd];
         dom.style.opacity = 1;
+        this.$route.meta.pageSize = this.infoInd;
       }, 300);
     },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
-    this.imgList = Magazines[this.dateInd];
-    this.info = this.imgList[this.infoInd];
-  },
-  //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {
-    this.$nextTick(() => {
-      setTimeout(() => {
-        let temp = this.$route.query.m;
-        if (temp) {
+    if (this.$route.meta.pageAge) this.dateInd = this.$route.meta.pageAge;
+    if (this.$route.meta.pageSize) {
+      this.infoInd = this.$route.meta.pageSize;
+      this.$nextTick(() => {
+        setTimeout(() => {
           // 获取滚动的总元素
           // 获取元素距离顶部的距离
-          let dom = document.querySelector(`#PMbox${temp}`);
+          let dom = document.querySelector(".box3");
           // 获取主滚动元素
           let domScroll = document.querySelector(".Layout");
-          domScroll.scrollTo({ top: dom.offsetTop-140});
-        }
-      }, 100);
-    });
+          domScroll.scrollTo({ top: dom.offsetTop-70 });
+        }, 100);
+      });
+    }
+
+    this.imgList = Magazines[this.dateInd];
+    this.info = this.imgList[this.infoInd];
   },
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {},
   beforeCreate() {}, //生命周期 - 创建之前
   beforeMount() {}, //生命周期 - 挂载之前
   beforeUpdate() {}, //生命周期 - 更新之前

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
webM/src/views/Search/data.js


+ 8 - 0
webM/src/views/Search/index.vue

@@ -140,6 +140,8 @@ export default {
             LayoutTop.style.display = "flex";
             this.menaSon = false;
           }
+          // 记录点击的滚动距离
+          this.$route.meta.sroolBack = scrollDom.scrollTop;
         };
         let temp = localStorage.getItem("SB_Serach");
         let Ind;
@@ -156,6 +158,12 @@ export default {
             behavior: "smooth",
           });
         }
+
+        if (this.$route.meta.sroolBack) {
+          setTimeout(() => {
+            scrollDom.scrollTo({ top: this.$route.meta.sroolBack });
+          }, 200);
+        }
       }, 0);
     });
   },

+ 2 - 6
webM/src/views/Visit/VisitInfo.vue

@@ -39,17 +39,13 @@
       <img src="@/assets/img/Visit/pp2.jpg" alt="" />
       <p>
         For personal visitors, please obtain the ticket at the service center at
-        the north door by
-      </p>
-      <p>
-        showing your booking number and the ID card used when the booking was
+        the north door by showing your booking number and the ID card used when the booking was
         made.
       </p>
       <p>
         For group visitors, the leader can obtain the ticket at the east door of
-        the ground floor
+        the ground floor with valid documents and introductory letters.
       </p>
-      <p>with valid documents and introductory letters.</p>
       <div class="title">Entrance Time</div>
       <img src="@/assets/img/Visit/pp3.jpg" alt="" />
       <p>From 09:00-16:00, Tuesday to Sunday.</p>