From a8e41fe88968eb5a2a2416e1334bf095fcd6631f Mon Sep 17 00:00:00 2001 From: qsh <> Date: Mon, 11 Nov 2024 16:32:21 +0800 Subject: [PATCH] sc --- src/api/system/notify/message/index.ts | 29 ++++++++++--------- src/layout/components/Message/src/Message.vue | 22 +++++++++----- src/store/modules/app.ts | 2 +- src/store/modules/user.ts | 2 +- src/views/Basic/Role/Comp/RoleEmployee.vue | 12 ++++++++ 5 files changed, 44 insertions(+), 23 deletions(-) diff --git a/src/api/system/notify/message/index.ts b/src/api/system/notify/message/index.ts index 07b6730..3ef0237 100644 --- a/src/api/system/notify/message/index.ts +++ b/src/api/system/notify/message/index.ts @@ -1,5 +1,4 @@ import request from '@/config/axios' -import qs from 'qs' export interface NotifyMessageVO { id: number @@ -16,35 +15,39 @@ export interface NotifyMessageVO { } // 查询站内信消息列表 -export const getNotifyMessagePage = async (params: PageParam) => { +export const getNotifyMessagePage = async (params: any) => { return await request.get({ url: '/admin-api/system/notify-message/page', params }) } // 获得我的站内信分页 -export const getMyNotifyMessagePage = async (params: PageParam) => { +export const getMyNotifyMessagePage = async (params: any) => { return await request.get({ url: '/admin-api/system/notify-message/my-page', params }) } // 批量标记已读 -export const updateNotifyMessageRead = async (ids) => { +export const updateNotifyMessageRead = async (data: any) => { return await request.put({ - url: - '/admin-api/system/notify-message/update-read?' + - qs.stringify({ ids: ids }, { indices: false }) + url: '/admin-api/system/notify-message/update-read?', + data }) } // 标记所有站内信为已读 -export const updateAllNotifyMessageRead = async () => { - return await request.put({ url: '/admin-api/system/notify-message/update-all-read' }) +export const updateAllNotifyMessageRead = async (data: any) => { + return await request.put({ url: '/admin-api/system/notify-message/update-all-read', data }) } // 获取当前用户的最新站内信列表 -export const getUnreadNotifyMessageList = async () => { - return await request.get({ url: '/admin-api/system/notify-message/get-unread-list' }) +export const getUnreadNotifyMessageList = async (params: any) => { + return await request.get({ url: '/admin-api/system/notify-message/get-unread-list', params }) } // 获得当前用户的未读站内信数量 -export const getUnreadNotifyMessageCount = async () => { - return await request.get({ url: '/admin-api/system/notify-message/get-unread-count' }) +export const getUnreadNotifyMessageCount = async (params: any) => { + return await request.get({ url: '/admin-api/system/notify-message/get-unread-count', params }) +} + +// 获取详情 +export const getNotifyMessageDetail = async (id: number) => { + return await request.get({ url: '/admin-api/system/notify-message/get', params: { id } }) } diff --git a/src/layout/components/Message/src/Message.vue b/src/layout/components/Message/src/Message.vue index f51751f..dcdc51f 100644 --- a/src/layout/components/Message/src/Message.vue +++ b/src/layout/components/Message/src/Message.vue @@ -1,7 +1,9 @@