import { fetchSso,fetchSso1 } from '@/core/request';

const headers = {
  cookieType: 'admin',
};

const servicePrefix = '';
// const servicePrefix = '/znsb/api';
export default {
  // 查询公告列表
  queryGgList(data) {
    return fetchSso({
      headers,
      url: `${servicePrefix}/mhzc/xxzx/listXxsjgg`,
      data: JSON.stringify(data),
      method: 'post',
    });
  },
  // 查询公告详情
  queryGgDetail(data) {
    return fetchSso({
      headers,
      url: `${servicePrefix}/mhzc/xxzx/getXxfbglDetails`,
      data: JSON.stringify(data),
      method: 'post',
    });
  },
  // 上传附件
  uploadFj(data) {
    return fetchSso({
      headers,
      url: `${servicePrefix}/mhzc/xxzx/uploadFj`,
      data: JSON.stringify(data),
      method: 'post',
    });
  },
  // 保存公告信息
  saveGgxx(params) {
    return fetchSso({
      headers,
      url: `${servicePrefix}/mhzc/xxzx/saveXxsjgg`,
      data: JSON.stringify(params),
      method: 'post',
    });
  },
  // 删除公告
  deleteGgxx(params) {
    return fetchSso({
      headers,
      url: `${servicePrefix}/mhzc/xxzx/updateXxsjggzt`,
      data: JSON.stringify(params),
      method: 'post',
    });
  },
  // 是否展示导出脚本按钮
  isDcFbggSql(params) {
    return fetchSso({
      headers,
      url: `${servicePrefix}/mhzc/xtxx/v1/isDcFbggSql`,
      data: JSON.stringify(params),
      method: 'post',
    });
  },
  // 导出脚本
  dcFbggSql(params) {
    return fetchSso({
      headers,
      url: `${servicePrefix}/mhzc/xtxx/v1/dcFbggSql`,
      data: JSON.stringify(params),
      method: 'post',
    });
  },
  uploadFiles(params) {
    return fetchSso({
      headers,
      url: `/cpzxApi/cpxx/uploadFile`,
      data: params,
      method: 'post',
    });
  },
  //查询勋章
  getXzByCurr(params) {
    return fetchSso1({
      url: `/yhzxApi/xz/getXzByCurr`,
      data: params,
      method: 'get',
    });
  },
    //发布动态
  addDt(params) {
    return fetchSso1({
      url: `/yhzxApi/dt/addDt`,
      data: JSON.stringify(params),
      method: 'post',
    });
  },
      //查询动态列表
  getDtPage(params) {
    return fetchSso1({
      url: `/yhzxApi/dt/getDtPage`,
      data: JSON.stringify(params),
      method: 'post',
    });
  },
  //删除动态
   delDt(params) {
    return fetchSso1({
      url: `/yhzxApi/dt/delDt?dtuuid=${params}`,
      method: 'get',
    });
  },
};

