import request from './request';
let api = {
  getPayWatchInfo: '/Program/Paywatch/getPayWatchInfo' // 获取付费信息
};
const prodApi = {
  getPayWatchInfo: 'https://privateapi.guangdianyun.tv/v1/Program/Paywatch/getPayWatchInfo' // 获取付费信息
};
const preApi = {
  // getPayWatchInfo: "" // 获取付费信息
};
const testApi = {
  // getPayWatchInfo: '' // 获取付费信息
};
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 getPayWatchInfo = data => {
  return request.get(api['getPayWatchInfo'], data);
};

export default {
  getPayWatchInfo
};
