给消息通知进行截取排序

This commit is contained in:
季圣华
2021-12-15 23:54:55 +08:00
parent 0c1316013b
commit 016c3cda5a

View File

@@ -103,6 +103,10 @@
getAction(this.url.getMsgByStatus, { status: '1'}).then((res) => {
if (res && res.code === 200) {
this.announcement1 = res.data;
if(this.announcement1.length>5) {
this.announcement1 = this.announcement1.reverse()
this.announcement1 = this.announcement1.slice(0,5)
}
this.msg1Count = res.data.length;
this.msg1Title = "通知(" + res.data.length + ")";
}