This commit is contained in:
joshen
2025-12-03 17:57:17 +08:00

View File

@@ -897,7 +897,8 @@ export default {
watch: { watch: {
"$route.query.keyword": { "$route.query.keyword": {
handler(newval) { handler(newval) {
if (newval) { if (newval && this.keyWord != newval) {
this.keyWord = newval;
this.search(true); this.search(true);
} }
}, },
@@ -1764,9 +1765,6 @@ export default {
}, },
// 查询 // 查询
search(num = false) { search(num = false) {
if (this.$route.query.keyword) {
this.keyWord = this.$route.query.keyword;
}
// 记录查询的数据 // 记录查询的数据
if (this.keyWord) { if (this.keyWord) {
apiSearchterm.save({ keyword: this.keyWord, type: 3 }); apiSearchterm.save({ keyword: this.keyWord, type: 3 });
@@ -1780,9 +1778,9 @@ export default {
} }
if (this.keyWord != this.queryCondition.keyWord) { if (this.keyWord != this.queryCondition.keyWord) {
this.queryCondition.keyWord = this.keyWord; this.queryCondition.keyWord = this.keyWord;
this.tagList.forEach((tag, index) => { // this.tagList.forEach((tag, index) => {
this.tagsClose(tag, index); // this.tagsClose(tag, index);
}); // });
} }
if (this.queryCondition.majorType == 0) { if (this.queryCondition.majorType == 0) {
this.queryCondition.majorType = ""; this.queryCondition.majorType = "";