fix:返回列表页时先触发校验再执行接口

This commit is contained in:
zxj
2025-12-03 17:40:44 +08:00
parent 56103bbdf6
commit 3852a92ab3

View File

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