// 本地开发环境
const local = {
  web_pc: 'localhost',
  origin: window.location.origin,
  api: 'https://aimoocapi.bozedu.top',
  oss: 'https://aimoocapi.bozedu.top',
  uc: 'https://uc.dev.bozedu.net/',
  openapi: 'https://openapi.dev.bozedu.net',
}

// 测试服环境
const development = {
  // web_pc: 'https://aimooc.bozedu.top',
  origin: window.location.origin,
  api: 'https://aimoocapi.bozedu.top',
  oss: 'https://aimoocapi.bozedu.top',
  uc: 'https://uc.dev.bozedu.net/',
  openapi: 'https://openapi.dev.bozedu.net',
}

// // 正式服环境
const production = {
  // web_pc: 'https://aimooc.bozedu.net',
  origin: window.location.origin,
  api: 'https://aimoocapi.bozedu.net',
  oss: 'https://aimoocapi.bozedu.net',
  uc: 'https://uc.bozedu.net/',
  openapi: 'https://openapi.bozedu.net',
}

function isWhich() {
  if (window.location.href.startsWith(development.web_pc)) {
    return development
  } else if (window.location.href.startsWith(production.web_pc)) {
    return production
  } else {
    return local
  }
}
// window.GLOBAL_CONFIG = isWhich()
window.GLOBAL_CONFIG = production
