import request from '../utils/request'

export function getPageByCondition(data) {
  return request({
    url: '/commonAnnIssueInfo/query/queryCommonPage', // 系统新闻一览
    method: 'get',
    params: data
  })
}
export function getTenantPageByCondition(data) {
  return request({
    url: '/commonAnnIssueInfo/query/queryTenantPage', // 租户新闻一览
    method: 'get',
    params: data
  })
}
export function queryCommonDetail(data) {
  return request({
    url: '/commonAnnIssueInfo/query/queryCommonDetail', // 系统新闻详情
    method: 'get',
    params: data
  })
}
export function tenantCommonDetail(data) {
  return request({
    url: '/commonAnnIssueInfo/query/queryTenantDetail', // 租户系统新闻详情
    method: 'get',
    params: data
  })
}
export function getFileList(data) {
  return request({
    url: '/appendix/query/getFileList', // 获取图片地址
    method: 'get',
    params: data
  })
}
// 用户发送范围
export function sendScope(params) {
  return request({
    url: '/commonAnnIssueInfo/query/getSendScopeList',
    method: 'get',
    params: params
  })
}
// 获取新闻类型
export function getNewType(params) {
  return request({
    url: '/newsParameterCompany/query/parameterTenant',
    method: 'get',
    params: params
  })
}
//保存新闻类型
export function createOrUpdateNewType(data) {
  return request({
    url: '/newsParameterCompany/api/createOrUpdateParameterList',
    method: 'post',
    data: data
  })
}
export function createIssueInfo(data) {
  return request({
    url: '/commonAnnIssueInfo/api/createCommonIssueInfo', // 新增
    method: 'post',
    data: data
  })
}
export function editIssueInfo(data) {
  return request({
    url: '/commonAnnIssueInfo/api/updateCommonIssueInfo', // 编辑
    method: 'post',
    data: data
  })
}
export function removeIssueInfo(data) {
  return request({
    url: '/commonAnnIssueInfo/api/remove', // 删除
    method: 'post',
    data: data
  })
}
