|
@@ -370,10 +370,10 @@
|
|
if (res['list']) {
|
|
if (res['list']) {
|
|
let resList = res['list']
|
|
let resList = res['list']
|
|
this.searchResStr = res['res'];
|
|
this.searchResStr = res['res'];
|
|
-
|
|
|
|
|
|
+ this.contentList = resList;
|
|
|
|
+ this.searchByContent();
|
|
}
|
|
}
|
|
})
|
|
})
|
|
-
|
|
|
|
},
|
|
},
|
|
duoxuanChange() {
|
|
duoxuanChange() {
|
|
if (this.duoxuan) {
|
|
if (this.duoxuan) {
|
|
@@ -643,7 +643,7 @@
|
|
},
|
|
},
|
|
search: function () {
|
|
search: function () {
|
|
document.documentElement.scrollTo(0, 0);
|
|
document.documentElement.scrollTo(0, 0);
|
|
- this.resourceMap = {};
|
|
|
|
|
|
+
|
|
console.log(this.tagChecked);
|
|
console.log(this.tagChecked);
|
|
|
|
|
|
let params = {'search': this.searchStr, tag_str: this.tagChecked.join(','), page: this.page, page_size: this.size};
|
|
let params = {'search': this.searchStr, tag_str: this.tagChecked.join(','), page: this.page, page_size: this.size};
|
|
@@ -654,7 +654,15 @@
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
this.contentList = res.res;
|
|
this.contentList = res.res;
|
|
-
|
|
|
|
|
|
+ this.searchByContent();
|
|
|
|
+ },
|
|
|
|
+ getAllTags: function () {
|
|
|
|
+ this.allTags = requestUtil.async('https://memos.tianyunperfect.cn/api/v1/tag', 'get', null, myHeaders).then(res => {
|
|
|
|
+ this.allTags = res;
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ searchByContent: function () {
|
|
|
|
+ this.resourceMap = {};
|
|
// contentList 循环获取里面所有的id数组
|
|
// contentList 循环获取里面所有的id数组
|
|
let idArr = this.contentList.map(item => item['id']);
|
|
let idArr = this.contentList.map(item => item['id']);
|
|
// 获取资源
|
|
// 获取资源
|
|
@@ -673,12 +681,6 @@
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- getAllTags: function () {
|
|
|
|
- this.allTags = requestUtil.async('https://memos.tianyunperfect.cn/api/v1/tag', 'get', null, myHeaders).then(res => {
|
|
|
|
- this.allTags = res;
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|