mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-15 14:57:13 +08:00
30 lines
759 B
TypeScript
30 lines
759 B
TypeScript
import http from '@/utils/http'
|
|
import type * as System from './type'
|
|
|
|
const BASE_URL = '/system/notice'
|
|
|
|
/** @desc 查询公告列表 */
|
|
export function listNotice(query: System.NoticeQuery) {
|
|
return http.get<PageRes<System.NoticeResp[]>>(`${BASE_URL}`, query)
|
|
}
|
|
|
|
/** @desc 查询公告详情 */
|
|
export function getNotice(id: string) {
|
|
return http.get<System.NoticeResp>(`${BASE_URL}/${id}`)
|
|
}
|
|
|
|
/** @desc 新增公告 */
|
|
export function addNotice(data: any) {
|
|
return http.post(BASE_URL, data)
|
|
}
|
|
|
|
/** @desc 修改公告 */
|
|
export function updateNotice(data: any, id: string) {
|
|
return http.put(`${BASE_URL}/${id}`, data)
|
|
}
|
|
|
|
/** @desc 删除公告 */
|
|
export function deleteNotice(ids: string | Array<number>) {
|
|
return http.del(`${BASE_URL}/${ids}`)
|
|
}
|