import request from '@/utils/request'; // 通知中心列表请求参数类型 export type NoticeListParams = { pageNo: string; pageSize: string; }; // 通知中心记录类型 export type NoticeRecord = { pageNo: null; pageSize: null; createBy: string; createTime: string; updateBy: string; updateTime: string; remark: null; lastUpdateTime: string; id: string; title: string; titleEn: string; content: string; contentEn: string; settingEn: string; columnType: string; publishBy: string; publishTime: string; isTop: string; status: string; delFlag: string; statusText: string; }; // 通知中心列表响应类型 export type NoticeListResponse = { records: NoticeRecord[]; total: number; size: number; current: number; orders: string[]; optimizeCountSql: boolean; hitCount: boolean; countId: null; maxLimit: null; searchCount: boolean; pages: number; }; // 通知中心详情请求参数类型 export type NoticeDetailParams = { id: string; }; /** * 获取通知中心列表 * @param params 分页参数 * @returns 通知中心列表数据 */ export async function getNoticeList(params: NoticeListParams) { return request>('/homePage/getNoticePage', { method: 'POST', data: params, }); } /** * 获取通知中心详情 * @param id 通知ID * @returns 通知中心详情数据 */ export async function getNoticeDetail(id: string) { return request>(`/homePage/getNoticeInfo/${id}`, { method: 'GET', }); }