Commit 35759dfd authored by “yiyousong”'s avatar “yiyousong”

perf: 优化页面

parent fd656d5a
...@@ -138,14 +138,24 @@ export default { ...@@ -138,14 +138,24 @@ export default {
data.hotWords = data.hotWords.map((v) => v.hotwords); data.hotWords = data.hotWords.map((v) => v.hotwords);
this.homeInfo = data; this.homeInfo = data;
this.SET_homeInfo(data); this.SET_homeInfo(data);
let datumList = this.removeDuplication( let datumList = [];
[...data.hotDatumList, ...data.datumList], let matterList = [];
"id" if (data.hotDatumList) {
).slice(0, 7); datumList = this.removeDuplication(
let matterList = this.removeDuplication( [...data.hotDatumList, ...data.datumList],
[...data.hotMatterList, ...data.matterList], "id"
"id" ).slice(0, 7);
).slice(0, 5); } else {
datumList = data.datumList.slice(0, 7);
}
if (data.hotMatterList) {
matterList = this.removeDuplication(
[...data.hotMatterList, ...data.matterList],
"id"
).slice(0, 5);
} else {
matterList = data.matterList.slice(0, 5);
}
this.SET_datumList(datumList); this.SET_datumList(datumList);
this.SET_matterList(matterList); this.SET_matterList(matterList);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment