diff --git a/index.html b/index.html index 15de931..67403fb 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@ href="https://unpkg.byted-static.com/latest/byted/arco-config/assets/favicon.ico" /> - 基于MQTT的IOT设备管理系统 + IOT设备管理系统
diff --git a/src/api/message.ts b/src/api/message.ts deleted file mode 100644 index ff4cbd2..0000000 --- a/src/api/message.ts +++ /dev/null @@ -1,39 +0,0 @@ -import axios from 'axios'; - -export interface MessageRecord { - id: number; - type: string; - title: string; - subTitle: string; - avatar?: string; - content: string; - time: string; - status: 0 | 1; - messageType?: number; -} -export type MessageListType = MessageRecord[]; - -export function queryMessageList() { - return axios.post('/api/message/list'); -} - -interface MessageStatus { - ids: string[]; -} - -// 批量设置消息已读 -export function setMessageStatus(data: MessageStatus) { - return axios.post('/api/message/read', data); -} - -export interface ChatRecord { - id: number; - username: string; - content: string; - time: string; - isCollect: boolean; -} - -export function queryChatList() { - return axios.post('/api/chat/list'); -} diff --git a/src/api/messages.ts b/src/api/messages.ts index 238fda0..76e686d 100644 --- a/src/api/messages.ts +++ b/src/api/messages.ts @@ -68,7 +68,7 @@ export function queryMessagesList(data: MessagesRecord) { } // 未读消息数量 export function queryMessagesCount() { - return axios.get('/api/rest/notice/count-unread'); + return axios.get('/api/rest/notice/countUnread'); } // 已读消息数量 diff --git a/src/components/message-box/list.vue b/src/components/message-box/list.vue index 9106e71..a5671b3 100644 --- a/src/components/message-box/list.vue +++ b/src/components/message-box/list.vue @@ -69,12 +69,11 @@