diff --git a/components/layouts/pc/header.vue b/components/layouts/pc/header.vue
index 68985c5..a9d81d2 100644
--- a/components/layouts/pc/header.vue
+++ b/components/layouts/pc/header.vue
@@ -18,12 +18,21 @@
-
-
-
-
+
+
+
+
+
+
+
创建作品集
@@ -69,6 +78,17 @@
+
+
+
+
+
+
登录
@@ -141,7 +161,9 @@ export default {
timeout: null,
show: false,
notifications: [],
- notificationNumbers: ""
+ notificationNumbers: "",
+ showPopover: false,
+ autofocus: false
};
},
watch: {
@@ -154,6 +176,13 @@ export default {
this.$router.push({
path: `/search?q=${this.queryString}`
})
+ this.$set(this, 'showPopover', false);
+ this.$set(this, 'queryString', '');
+ },
+ handleShowPopover() {
+ setTimeout(function () {
+ document.getElementById("searchInput").focus()
+ }, 500);
},
handleSelectMenu(item) {
let _ts = this;
@@ -223,7 +252,7 @@ export default {
let user = this.user;
if (user) {
this.getUnreadNotifications();
- sockClient.initSocket(this.$store.state.userInfo);
+ // sockClient.initSocket(this.$store.state.userInfo);
}
}
diff --git a/pages/search.vue b/pages/search.vue
index 03389ed..9ec0214 100644
--- a/pages/search.vue
+++ b/pages/search.vue
@@ -1,7 +1,9 @@
-
+
+
+
@@ -66,9 +68,12 @@ export default {
},
methods: {
search() {
- this.$store.dispatch("search/fetchArticleList", {queryString: this.q});
- this.$store.dispatch("search/fetchUserList", {queryString: this.q});
- this.$store.dispatch("search/fetchPortfolioList", {queryString: this.q});
+ let _ts = this
+ if (_ts.q) {
+ _ts.$router.push({
+ path: `/search?q=${_ts.q}`
+ })
+ }
},
currentChangeArticle(page) {
this.$store.dispatch("search/fetchArticleList", {queryString: this.q, page: page});
@@ -90,6 +95,7 @@ export default {
let _ts = this;
let queryString = _ts.$route.query.q;
_ts.$set(_ts, "q", queryString);
+ _ts.$store.commit('setActiveMenu', 'search')
}
}