diff --git a/yudao-ui-admin-vue3/src/api/system/notify/message/index.ts b/yudao-ui-admin-vue3/src/api/system/notify/message/index.ts index 92068b89d..d12ee35fa 100644 --- a/yudao-ui-admin-vue3/src/api/system/notify/message/index.ts +++ b/yudao-ui-admin-vue3/src/api/system/notify/message/index.ts @@ -31,3 +31,38 @@ export const getNotifyMessagePageApi = async (params: NotifyMessagePageReqVO) => export const getNotifyMessageApi = async (id: number) => { return await request.get({ url: '/system/notify-message/get?id=' + id }) } + +// 获得我的站内信分页 +// export function getMyNotifyMessagePage(query) { +// return request({ +// url: '/system/notify-message/my-page', +// method: 'get', +// params: query +// }) +// } + +// 批量标记已读 +// export function updateNotifyMessageRead(ids) { +// return request({ +// url: '/system/notify-message/update-read?' + qs.stringify({ids: ids}, { indices: false }), +// method: 'put' +// }) +// } + +// 标记所有站内信为已读 +// export function updateAllNotifyMessageRead() { +// return request({ +// url: '/system/notify-message/update-all-read', +// method: 'put' +// }) +// } + +// 获取当前用户的最新站内信列表 +export const getUnreadNotifyMessageListApi = async () => { + return await request.get({ url: '/system/notify-message/get-unread-list' }) +} + +// 获得当前用户的未读站内信数量 +export const getUnreadNotifyMessageCountApi = async () => { + return await request.get({ url: '/system/notify-message/get-unread-count' }) +} diff --git a/yudao-ui-admin-vue3/src/layout/components/Message/src/Message.vue b/yudao-ui-admin-vue3/src/layout/components/Message/src/Message.vue index ba21cfdce..acef9ac95 100644 --- a/yudao-ui-admin-vue3/src/layout/components/Message/src/Message.vue +++ b/yudao-ui-admin-vue3/src/layout/components/Message/src/Message.vue @@ -1,77 +1,72 @@ - + - - + + - + - + - {{ item.title }} - {{ item.date }} - - - - - - - - - - - - {{ item.title }} - {{ item.date }} - - - - - - - - - - - - {{ item.title }} - {{ item.date }} + + {{ item.templateNickname }}:{{ item.templateContent }} + + + {{ dayjs(item.createTime).format('YYYY-MM-DD HH:mm:ss') }} + + + + + diff --git a/yudao-ui-admin/src/api/system/notify/message.js b/yudao-ui-admin/src/api/system/notify/message.js index 0fdf4717d..5ef63a4f2 100644 --- a/yudao-ui-admin/src/api/system/notify/message.js +++ b/yudao-ui-admin/src/api/system/notify/message.js @@ -43,6 +43,7 @@ export function getUnreadNotifyMessageList() { }) } +// 获得当前用户的未读站内信数量 export function getUnreadNotifyMessageCount() { return request({ url: '/system/notify-message/get-unread-count', diff --git a/yudao-ui-admin/src/layout/components/Message/index.vue b/yudao-ui-admin/src/layout/components/Message/index.vue index 347242cbe..e49060561 100644 --- a/yudao-ui-admin/src/layout/components/Message/index.vue +++ b/yudao-ui-admin/src/layout/components/Message/index.vue @@ -9,7 +9,7 @@ - + {{ parseTime(scope.row.createTime) }} @@ -49,7 +49,7 @@ export default { // 首次加载小红点 this.getUnreadCount() // 轮询刷新小红点 - window.timer = setInterval(()=>{ + setInterval(() => { this.getUnreadCount() },1000 * 60 * 2) },