Bladeren bron

修改搜索跳转逻辑

bruce 5 jaren geleden
bovenliggende
commit
b0f2e9979e
1 gewijzigde bestanden met toevoegingen van 5 en 5 verwijderingen
  1. 5 5
      components/header.vue

+ 5 - 5
components/header.vue

@@ -379,11 +379,11 @@
         location.href = this.baseUrl + url;
       },
       clickInputEnter() {
-        // console.log("location ==", this.$route.path + "/?keyword=" + this.keywork);
-        // console.log("window.location ==", window.location.href);
-        // console.log("windown.location.hostname=", window.location.hostname);
-        // console.log("windown.location.pathname=", window.location.pathname);
-        let url = window.location.hostname + "/" + window.location.pathname + "/?keyword=" + this.keywork;
+        console.log("location ==", this.$route.path + "/?keyword=" + this.keywork);
+        console.log("window.location ==", window.location.href);
+        console.log("windown.location.hostname=", window.location.hostname);
+        console.log("windown.location.pathname=", window.location.pathname);
+        let url = "/?keyword=" + this.keywork;
         console.log(url);
         window.location.href = url;
       },