import request, { postBlob, getBlob, handleImport } from '@/utils/request'


export function zfapiNoticeDetail(params) {
  return request({
    url: '/notice/detail',
    method: 'get',
    params
  })
}

export function noticeReadList(data) {
  return request({
    url: `/notice/read/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function noticeReadListExport(data, name) {
  return postBlob({
    url: '/notice/read/list/export',
    data,
    name
  })
}

// 获取师傅列表
export function noticeListPageV2(data) {
  return request({
    url: `/notice/listNotice?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function noticePageExport(data, name) {
  return postBlob({
    url: '/notice/listNotice/export',
    data,
    name
  })
}

export function noticeAdd(data) {
  return request({
    url: '/notice/add',
    method: 'post',
    data
  })
}
export function noticeUpdate(data) {
  return request({
    url: '/notice/update',
    method: 'post',
    data
  })
}

export function noticeDel(params) {
  return request({
    url: '/notice/mark/del',
    method: 'post',
    params
  })
}

export function getNoticeDetail(params) {
  return request({
    url: '/notice/detailNotice',
    method: 'get',
    params
  })
}