notice.ets 1.0 KB
import https from './request'

export interface noticeTest {
  total: number;
  rows:  noticeRow[];
  code:  number;
  msg:   string;
}

export interface noticeDetailTest {
  data:  noticeRow;
  code:  number;
  msg:   string;
}
export interface noticeRow {
  createBy?:      string;
  createTime?:    string;
  updateBy?:      string;
  updateTime?:    null | string;
  remark?:        null;
  noticeId?:      number;
  noticeTitle:   string;
  noticeType:    string;
  noticeContent: string;
  status?:        string;
}

export interface  noticeParams {
  pageNum: number
  pageSize: number
  noticeTitle?: string
  createBy?: string
  status?: string
  noticeType?: string
}

// 获取公告列表
export const getNoticeList = (data: noticeParams) => {
  return https<noticeTest>({
    url: '/system/notice/list',
    method: 'get',
    params: data
  })
}

// 获取公告详情
export const getNoticeDetail = (id: number) => {
  return https<noticeDetailTest>({
    url: `/system/notice/${id}`,
    method: 'get',
  })
}