diff --git a/src/components/HeaderNav.vue b/src/components/HeaderNav.vue
index 5de69b9..1e22365 100755
--- a/src/components/HeaderNav.vue
+++ b/src/components/HeaderNav.vue
@@ -10,7 +10,7 @@
-
+
@@ -119,11 +119,9 @@ export default {
this.$http.post("/api/index",).then((res) => {
if (res.code != 200) return;
// this.prototype.userInfo = res.data.user
- // this.userInfo = res.data.user;
+ this.userInfo = res.data.user;
this.islogin = res.data.user.uid > 0 ? true : false;
this.hotSearchkeywords = res.data.hotSearchkeywords
- this.prototype.userInfo = res.data.user
- console.log(this.prototype.userInfo, "userInfo");
}).catch(err => {
this.$message.error(err.message)
diff --git a/src/components/SearchBox.vue b/src/components/SearchBox.vue
index 29de112..8c121fb 100755
--- a/src/components/SearchBox.vue
+++ b/src/components/SearchBox.vue
@@ -30,9 +30,7 @@
热门搜索
- Bocconi
- Bocconi
- Bocconi
+ {{ item }}
@@ -49,7 +47,7 @@ export default {
showClear: false, //显示清除按钮
}
},
- props: ["issearch"],
+ props: ["issearch", "hotSearchkeywords"],
methods: {
collapseClick() {
@@ -74,7 +72,12 @@ export default {
// 清空文本框
clearText() {
this.searchText = ""
- }
+ },
+
+ // 跳转搜索结果
+ toSearchResult(kw){
+ this.$router.push(`/searchResult?kw=${kw}`)
+ },
},
mounted() {
if (this.searchText.length > 0) this.showClear = true
diff --git a/src/views/search/searchResult/SearchResult.vue b/src/views/search/searchResult/SearchResult.vue
index 695b1af..6d550af 100755
--- a/src/views/search/searchResult/SearchResult.vue
+++ b/src/views/search/searchResult/SearchResult.vue
@@ -4,7 +4,7 @@