mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-06 17:36:42 +08:00
fix:返回列表页时先触发校验再执行接口
This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user