feat: 新增公告管理(列表,新增)

This commit is contained in:
Yoofff
2024-04-26 02:55:20 +00:00
committed by Charles7c
parent 7a09333744
commit c006e271bf
5 changed files with 391 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
import http from '@/utils/http'
import type * as System from './type'
const BASE_URL = '/system/announcement'
export function listAnnouncement(query: System.AnnouncementQuery) {
return http.get<PageRes<System.AnnouncementResp[]>>(`${BASE_URL}`, query)
}
export function getAnnouncement(id: string) {
return http.get<System.AnnouncementResp>(`${BASE_URL}/${id}`)
}
export function addAnnouncement(req: any) {
return http.post(BASE_URL, req)
}
export function updateAnnouncement(req: any, id: string) {
return http.put(`${BASE_URL}/${id}`, req)
}
export function delAnnouncement(ids: string | Array<number>) {
return http.del(`${BASE_URL}/${ids}`)
}

View File

@@ -7,3 +7,4 @@ export * from './dict'
export * from './file'
export * from './storage'
export * from './option'
export * from './announcement'

View File

@@ -222,3 +222,26 @@ export interface BindSocialAccountRes {
source: string
description: string
}
/** 公告类型 */
export interface AnnouncementResp {
id: string
title: string
content: string
status: number
type?: string
effectiveTime?: string
terminateTime?: string
createUser: string
createTime: string
updateUser: string
updateTime: string
createUserString: string
updateUserString: string
}
export interface AnnouncementQuery extends PageQuery {
title?: string
status?: number
type?: string
}