import request from './request';
let api = {
  getReportListFront: '/picText/live/Content/getReportListFront', // 获取报道列表
  getReportInfo: '/picText/live/Content/getReportInfo' // 获取报道内容
};
const prodApi = {
  getReportListFront: 'https://pixtext.guangdianyun.tv/v1/picText/live/Content/getReportListFront', // 获取报道列表
  getReportInfo: 'https://pixtext.guangdianyun.tv/v1/picText/live/Content/getReportInfo' // 获取报道内容
};
const preApi = {
  // getReportListFront: '', // 获取报道列表
  // getReportInfo: '' // 获取报道内容
};
const testApi = {
  // getReportListFront: '', // 获取报道列表
  // getReportInfo: '' // 获取报道内容
};
if (!process.env.private) {
  if (!process.env.X_CA_STAGE) {
    api = { ...api, ...prodApi };
  } else if (process.env.X_CA_STAGE === 'PRE') {
    api = { ...api, ...preApi };
  } else if (process.env.X_CA_STAGE === 'TEST') {
    api = { ...api, ...testApi };
  }
}

export const getReportListFront = data => {
  return request.get(api['getReportListFront'], data);
};
export const getReportInfo = data => {
  return request.get(api['getReportInfo'], data);
};

export default {
  getReportListFront,
  getReportInfo
};
