mirror of
https://gitee.com/JavaLionLi/plus-ui.git
synced 2026-08-07 13:07:53 +00:00
update 完成消息盒子功能前后端联动(已读未读在前端浏览器存储)
This commit is contained in:
@@ -53,10 +53,7 @@ export function register(data: any) {
|
||||
*/
|
||||
export function logout() {
|
||||
closePush();
|
||||
if (
|
||||
import.meta.env.VITE_APP_MESSAGE_ENABLED === 'true'
|
||||
&& import.meta.env.VITE_APP_MESSAGE_TRANSPORT.toLowerCase() !== 'websocket'
|
||||
) {
|
||||
if (import.meta.env.VITE_APP_MESSAGE_ENABLED === 'true' && import.meta.env.VITE_APP_MESSAGE_TRANSPORT.toLowerCase() === 'sse') {
|
||||
request({
|
||||
url: import.meta.env.VITE_APP_MESSAGE_PATH + '/close',
|
||||
method: 'get'
|
||||
|
||||
10
src/api/system/message/index.ts
Normal file
10
src/api/system/message/index.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { MessageBoxVO } from './types';
|
||||
|
||||
export function getMessageBox(): AxiosPromise<MessageBoxVO> {
|
||||
return request({
|
||||
url: '/system/message/box',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
17
src/api/system/message/types.ts
Normal file
17
src/api/system/message/types.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
export interface MessageVO extends BaseEntity {
|
||||
messageId: number | string;
|
||||
category: string;
|
||||
type: string;
|
||||
source: string;
|
||||
title: string;
|
||||
message: string;
|
||||
content?: string;
|
||||
data?: Record<string, any> | null;
|
||||
path?: string;
|
||||
}
|
||||
|
||||
export interface MessageBoxVO {
|
||||
systemList: MessageVO[];
|
||||
noticeList: MessageVO[];
|
||||
workflowList: MessageVO[];
|
||||
}
|
||||
Reference in New Issue
Block a user