export const SUCCESS_CODE = '0000'; // 成功状态码
export default {
  // eslint-disable-next-line
  api: process.env['NODE_ENV'] === 'development' ? '/dmApi' : window.location.protocol + '//' + window.location.host || ''
  // api: process.env['NODE_ENV'] === 'development' ? 'https://four.gicdev.com' : window.location.protocol + '//' + window.location.host || ''
  // https://four.gicdev.com
  // /dmApi
};


function getOrigin() {
  let origin = window.location.origin;
  if (origin.indexOf('localhost') >= 0 || origin.indexOf('192.168') >= 0) {
    origin = 'https://four.gicdev.com';
  }
  return origin;
}
export const origin = getOrigin();

// eslint-disable-next-line
export const developerLinkPrefix = process.env['NODE_ENV'] === 'development' || window.location.host === 'four.gicdev.com' ? 'https://four.gicdev.com' : window.location.origin;


export const gicFourUrl = 'https://four.gicdev.com';


export const marketPrefix = '/api-marketing'; // 营销接口前缀
export const commonPrefix = '/gic-auth-web'; // 通用前缀
export const welfarePrefix = '/api-welfare'; // 福利中心前缀
export const giftPrefix = '/gift'; // 礼品前缀