Commit 6d842cf1 authored by xhx's avatar xhx

消息排序

parent 2ef4f9e7
......@@ -159,6 +159,7 @@ export default defineComponent({
const ret = await queryNotifyList({ notify_type: "1" });
if (ret.code === 200) {
const list = ret.data.items;
list.sort((a, b) => b.created_at - a.created_at)
this.notifyList = list;
}
},
......
......@@ -22,6 +22,7 @@ export default defineComponent({
const notifyList = () => {
getNotifyList(type).then(res => {
list.value = res.data.items
list.value.sort((a: {created_at: number}, b: {created_at: number}) => b.created_at - a.created_at)
})
}
notifyList()
......
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