mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-10 08:57:10 +08:00
32 lines
770 B
TypeScript
32 lines
770 B
TypeScript
import type * as T from './type'
|
|
import http from '@/utils/http'
|
|
|
|
export type * from './type'
|
|
|
|
const BASE_URL = '/system/message'
|
|
|
|
/** @desc 查询消息列表 */
|
|
export function listMessage(query: T.MessagePageQuery) {
|
|
return http.get<PageRes<T.MessageResp[]>>(`${BASE_URL}`, query)
|
|
}
|
|
|
|
/** @desc 删除消息 */
|
|
export function deleteMessage(ids: Array<string>) {
|
|
return http.del(`${BASE_URL}`, { ids })
|
|
}
|
|
|
|
/** @desc 标记已读 */
|
|
export function readMessage(ids?: Array<string>) {
|
|
return http.patch(`${BASE_URL}/read`, { ids })
|
|
}
|
|
|
|
/** @desc 全部已读 */
|
|
export function readAllMessage() {
|
|
return http.patch(`${BASE_URL}/readAll`)
|
|
}
|
|
|
|
/** @desc 查询未读消息数量 */
|
|
export function getUnreadMessageCount() {
|
|
return http.get(`${BASE_URL}/unread`)
|
|
}
|