소스 검색

修改搜索跳转逻辑

bruce 5 년 전
부모
커밋
b0f2e9979e
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  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;
       },