fix:修复 createTime 为 date,并且为可选的

This commit is contained in:
YunaiV
2025-12-16 23:53:40 +08:00
parent d971aba582
commit 2dc5ed888f
17 changed files with 109 additions and 159 deletions

View File

@@ -0,0 +1,39 @@
import type { PageParam, PageResult } from '@/http/types'
import { http } from '@/http/http'
const baseUrl = '/system/notice'
/** 通知公告信息 */
export interface Notice {
id?: number
title: string
content: string
type: number
status: number
createTime?: Date
}
/** 获取通知公告分页列表 */
export function getNoticePage(params: PageParam) {
return http.get<PageResult<Notice>>(`${baseUrl}/page`, params)
}
/** 获取通知公告详情 */
export function getNotice(id: number) {
return http.get<Notice>(`${baseUrl}/get?id=${id}`)
}
/** 创建通知公告 */
export function createNotice(data: Notice) {
return http.post<number>(`${baseUrl}/create`, data)
}
/** 更新通知公告 */
export function updateNotice(data: Notice) {
return http.put<boolean>(`${baseUrl}/update`, data)
}
/** 删除通知公告 */
export function deleteNotice(id: number) {
return http.delete<boolean>(`${baseUrl}/delete?id=${id}`)
}