Explorar o código

页面跳转replace改push

任一存 %!s(int64=3) %!d(string=hai) anos
pai
achega
cf9b560a4e

+ 1 - 1
web/src/config.js

@@ -9,7 +9,7 @@ switch (process.env.NODE_ENV) {
     break;
 }
 
-const version = 'v0527.1017'
+const version = 'v0527.1756'
 
 module.exports = {
   publicPath,

+ 2 - 2
web/src/views/About/Director.vue

@@ -84,8 +84,8 @@
         </p>
       </div>
       <div class="back_btn"
-        @click="$router.replace('/Layout/About')"
-        @keydown.enter.passive="$router.replace('/Layout/About')"
+        @click="$router.push('/Layout/About')"
+        @keydown.enter.passive="$router.push('/Layout/About')"
         tabindex="0"
         aria-label="Link"
       >

+ 1 - 1
web/src/views/About/President.vue

@@ -48,7 +48,7 @@
         </div>
       </div>
     </div>
-    <div class="back_btn" @click="$router.replace('/Layout/About')">Back to top</div>
+    <div class="back_btn" @click="$router.push('/Layout/About')">Back to top</div>
   </div>
 </template>
 

+ 4 - 4
web/src/views/About/index.vue

@@ -61,8 +61,8 @@
       </div>
       <p
         class="more"
-        @click="$router.replace('/Layout/About/Director')"
-        @keydown.enter.passive="$router.replace('/Layout/About/Director')"
+        @click="$router.push('/Layout/About/Director')"
+        @keydown.enter.passive="$router.push('/Layout/About/Director')"
         tabindex="0"
         aria-label="Link"
       >
@@ -140,8 +140,8 @@
         class="see"
         src="/data/About/a7.gif"
         alt=""
-        @click="$router.replace('/Layout/About/link')"
-        @keydown.enter.passive="$router.replace('/Layout/About/link')"
+        @click="$router.push('/Layout/About/link')"
+        @keydown.enter.passive="$router.push('/Layout/About/link')"
         tabindex="0"
         aria-label="Link"
         aria-description="See More"

+ 1 - 1
web/src/views/Collections/index.vue

@@ -225,7 +225,7 @@ export default {
       });
     },
     cutTab(path) {
-      this.$router.replace(`/Layout/Collections/${path}`).catch(() => {});
+      this.$router.push(`/Layout/Collections/${path}`).catch(() => {});
     },
   },
   //生命周期 - 创建完成(可以访问当前this实例)

+ 1 - 1
web/src/views/Events/index.vue

@@ -85,7 +85,7 @@ export default {
   //方法集合
   methods: {
     skip(id) {
-      this.$router.replace(`/Layout/EventsInfo/${id}`);
+      this.$router.push(`/Layout/EventsInfo/${id}`);
     },
   },
   //生命周期 - 创建完成(可以访问当前this实例)

+ 1 - 1
web/src/views/Events/info.vue

@@ -158,7 +158,7 @@ export default {
       this.requestProcessElementInTxtMain()
     },
     skip(id) {
-      this.$router.replace(`/Layout/EventsInfo/${id}`).catch(() => {});
+      this.$router.push(`/Layout/EventsInfo/${id}`).catch(() => {});
       this.requestProcessElementInTxtMain()
     },
     // 点击回到顶部

+ 1 - 1
web/src/views/Exhibitions/component/List.vue

@@ -174,7 +174,7 @@ export default {
     // 点击单个文章跳转详情
     toInfo(id){
      let k = this.$route.params.id;
-      this.$router.replace({
+      this.$router.push({
         name:'ExhibitionsInfo',
         query:{id,k}
       })

+ 1 - 1
web/src/views/Exhibitions/index.vue

@@ -139,7 +139,7 @@ export default {
   //方法集合
   methods: {
     skip(url) {
-      this.$router.replace(url).catch(() => {});
+      this.$router.push(url).catch(() => {});
     },
   },
   //生命周期 - 创建完成(可以访问当前this实例)

+ 4 - 4
web/src/views/Exhibitions/info.vue

@@ -264,10 +264,10 @@ export default {
     },
     // 点击面包屑的最后一个
     backExh(txt) {
-      if (txt === "Current") this.$router.replace("/Layout/Exhibitions/1");
-      else if (txt === "Permanent") this.$router.replace("/Layout/Exhibitions/2");
-      else if (txt === "Past") this.$router.replace("/Layout/Exhibitions/3");
-      else if (txt === "Overseas") this.$router.replace("/Layout/Exhibitions/4");
+      if (txt === "Current") this.$router.push("/Layout/Exhibitions/1");
+      else if (txt === "Permanent") this.$router.push("/Layout/Exhibitions/2");
+      else if (txt === "Past") this.$router.push("/Layout/Exhibitions/3");
+      else if (txt === "Overseas") this.$router.push("/Layout/Exhibitions/4");
     },
     // 固定滚动的切换
     cutGun(val) {

+ 4 - 4
web/src/views/Home/index.vue

@@ -64,7 +64,7 @@
       aria-label aria-description="You've reached the pop-up window section; this section contains four URLs; please use the tab key to go through the content."
     >
       <div
-        class="t1" @click="$router.replace('/Layout/Visit/2')"
+        class="t1" @click="$router.push('/Layout/Visit/2')"
         tabindex="0"
         aria-label="Link"
         aria-description="Reservation"
@@ -93,7 +93,7 @@
           </div>
         </div>
       </div>
-      <div class="t2" @click="$router.replace('/Layout/Visit/1')"
+      <div class="t2" @click="$router.push('/Layout/Visit/1')"
         tabindex="0"
         aria-label="Link"
         aria-description="Visit Info"
@@ -141,7 +141,7 @@
           </div>
         </div>
       </div>
-      <div class="t4" @click="$router.replace('/Layout/Events')"
+      <div class="t4" @click="$router.push('/Layout/Events')"
         tabindex="0"
         aria-label="Link"
         aria-description="Events"
@@ -183,7 +183,7 @@ export default {
   methods: {
     // 底部的跳转
     botskip() {
-      this.$router.replace("/Layout/About").catch(() => {});
+      this.$router.push("/Layout/About").catch(() => {});
       setTimeout(() => {
         window.scrollTo({ top: 1307, behavior: "smooth" });
       }, 100);

+ 1 - 1
web/src/views/JoinSupport/Give.vue

@@ -75,7 +75,7 @@ export default {
   //方法集合
   methods: {
     skip(id) {
-      this.$router.replace({
+      this.$router.push({
         name: "GiveInfo",
         query: { id },
       });

+ 1 - 1
web/src/views/JoinSupport/Volunteer.vue

@@ -45,7 +45,7 @@ export default {
   methods: {
     // 点击单个进入详情
     skip(id) {
-      this.$router.replace({
+      this.$router.push({
         name: "VolunteerInfo",
         query: { id },
       });

+ 1 - 1
web/src/views/JoinSupport/index.vue

@@ -107,7 +107,7 @@ export default {
   //方法集合
   methods: {
     skip(url){
-      this.$router.replace(`/Layout/JoinSupport/${url}`).catch(() => {});
+      this.$router.push(`/Layout/JoinSupport/${url}`).catch(() => {});
     }
   },
   //生命周期 - 创建完成(可以访问当前this实例)

+ 2 - 2
web/src/views/LearnEngage/index.vue

@@ -145,7 +145,7 @@ export default {
   methods: {
     // 跳转到info页面
     toInfo(id) {
-      this.$router.replace({
+      this.$router.push({
         name: "LearnEngageInfo",
         query: { id, k:this.topId,m:this.pageSize},
       });
@@ -156,7 +156,7 @@ export default {
       window.scrollTo({ top: 300, behavior: "smooth" });
     },
     skip(url) {
-      this.$router.replace(url).catch(() => {});
+      this.$router.push(url).catch(() => {});
     },
     // 封装一个处理数据的方法
     getData() {

+ 2 - 2
web/src/views/LearnEngage/info.vue

@@ -81,8 +81,8 @@
         </div>
         <div
           class="back"
-          @click="$router.replace(`/Layout/LearnEngage/${mbTxt}?m=${pageSize}`)"
-          @keydown.enter.passive="$router.replace(`/Layout/LearnEngage/${mbTxt}?m=${pageSize}`)"
+          @click="$router.push(`/Layout/LearnEngage/${mbTxt}?m=${pageSize}`)"
+          @keydown.enter.passive="$router.push(`/Layout/LearnEngage/${mbTxt}?m=${pageSize}`)"
           tabindex="0"
           aria-label="Link"
         >

+ 1 - 1
web/src/views/Publications/Publications1.vue

@@ -112,7 +112,7 @@ export default {
   methods: {
     // 点击书籍跳转
     jump(id) {
-      this.$router.replace({
+      this.$router.push({
         name: "PublicationsInfo",
         query: { id },
       });

+ 3 - 3
web/src/views/Publications/index.vue

@@ -101,11 +101,11 @@ export default {
         else if (id <= 17) temp = 2019;
         else if (id <= 23) temp = 2018;
         else temp = 2017;
-        this.$router.replace({
+        this.$router.push({
           name: "Publications1",
           query: { k: temp },
         });
-      } else this.$router.replace(url).catch(() => {});
+      } else this.$router.push(url).catch(() => {});
     },
     backUrl() {
       if (this.$route.path === "/Layout/PublicationsInfo") {
@@ -117,7 +117,7 @@ export default {
         else if (id <= 17) temp = 2019;
         else if (id <= 23) temp = 2018;
         else temp = 2017;
-        this.$router.replace({
+        this.$router.push({
           name: "Publications1",
           query: { k: temp },
         });

+ 1 - 1
web/src/views/Visit/index.vue

@@ -89,7 +89,7 @@ export default {
   //方法集合
   methods: {
     skip(url){
-      this.$router.replace(url).catch(() => {});
+      this.$router.push(url).catch(() => {});
     }
   },
   //生命周期 - 创建完成(可以访问当前this实例)

+ 1 - 1
web/src/views/bottom/Index.vue

@@ -487,7 +487,7 @@ export default {
         window.open(url)
         return
       }
-      this.$router.replace(url).catch(() => {});
+      this.$router.push(url).catch(() => {});
       if (sroll) {
         setTimeout(() => {
           window.scrollTo({ top: sroll, behavior: "smooth" });

+ 4 - 4
web/src/views/layout/index.vue

@@ -246,25 +246,25 @@ export default {
     // 点击搜索
     search() {
       // if (this.searchTxt.trim() === "" || this.searchTxt.trim().length < 4) return
-      this.$router.replace({
+      this.$router.push({
         name: "Search",
         params: {txt:this.searchTxt},
       });
     },
     // 第一级的跳转
     skipOne(url) {
-      this.$router.replace("/Layout/" + url).catch(() => {});
+      this.$router.push("/Layout/" + url).catch(() => {});
     },
     // 第二级的跳转
     skipTow(url, about) {
       document.activeElement.blur()
       // 如果是about页面
       if (about === true) {
-        this.$router.replace("/Layout/About").catch(() => {});
+        this.$router.push("/Layout/About").catch(() => {});
         setTimeout(() => {
           window.scrollTo({ top: url, behavior: "smooth" });
         }, 100);
-      } else this.$router.replace(url).catch(() => {});
+      } else this.$router.push(url).catch(() => {});
     },
   },
   //生命周期 - 创建完成(可以访问当前this实例)

+ 1 - 1
web/src/views/null/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="null">
     <div>
-      <div @click="$router.replace('/')">返 回 首 页</div>
+      <div @click="$router.push('/')">返 回 首 页</div>
       <div class="back" @click="$router.go(-1)">返 回 上 一 页</div>
     </div>
   </div>