// 本地开发环境
const local = {
  web_pc: 'http://tyyx.bozedu.top/',
  web_mobile: 'http://tyyxm.bozedu.top/',

  api: 'http://tyyx_openapi.bozedu.top/',
  oss: 'http://tyyx_openapi.bozedu.top/',
  origin: window.location.origin,
}

// 测试服环境
const development = {
    web_pc: 'http://tyyx.bozedu.top/',
    web_mobile: 'http://tyyxm.bozedu.top/',
    origin: window.location.origin,
    api: 'http://tyyx_openapi.bozedu.top/',
    oss: 'http://tyyx_openapi.bozedu.top/'
}

// 正式服环境
const production = {
  web_pc: 'https://nml.bozedu.net/',
  web_mobile: 'https://nmlm.bozedu.net/',
    origin: window.location.origin,
    api: 'https://nmlopenapi.bozedu.net/',
  oss: 'https://nmlopenapi.bozedu.net/'
}

function isWhich() {
  if (window.location.host.includes('tyyx.bozedu.top')) {
    return development
  } else if (window.location.host.includes('tyyx.txhlwxx.com')) {
    return production
  } else {
    return local
  }
}
window.GLOBAL_CONFIG = isWhich()

