// 本地开发环境
const local = {
  oss: 'http://jnjymf_api.bozedu.top/',
  api: 'http://jnjymf_api.bozedu.top/',
  login: 'https://qqyxt.dev.bozedu.net/app/activityRating/home/login.html',
  origin: window.location.origin,
}

// 测试服环境
const development = {
  oss: 'http://jnjymf_api.bozedu.top/',
  api: 'http://jnjymf_api.bozedu.top/',
  login: 'https://qqyxt.dev.bozedu.net/app/activityRating/home/login.html',
  origin: window.location.origin + '/app/jdbg/',
}

// 正式服环境
const production = {
  oss: 'http://60.188.226.44:8090/',
  api: 'http://60.188.226.44:8090/',
  login: 'https://qqyxt.bozedu.net/app/activityRating/home/login.html',
  origin: window.location.origin + '/app/jdbg/',
}

function isWhich() {
  if (window.location.href.includes('localhost')) {
    return local
  } else if (window.location.href.includes('bozedu')) {
    return development
  } else {
    return production
  }
}
window.globalVariables = window.GLOBAL_CONFIG = isWhich()
