// 本地开发环境
const local = {
    oss: 'http://10.234.7.185:8090',
    api: 'http://10.234.7.185:8090/',
    login: 'http://10.234.7.185:8000/home/login.html',
    origin: window.location.origin,
}

// 测试服环境
const development = {
    oss: 'http://10.234.7.185:8090',
    api: 'http://10.234.7.185:8090/',
    login: 'http://10.234.7.185:8000/home/login.html',
  origin: window.location.origin + '/manage/',
}

// 正式服环境
const production = {
    oss: 'http://10.234.7.185:8090',
    api: 'http://10.234.7.185:8090/',
    login: 'http://10.234.7.185:8000/home/login.html',
  origin: window.location.origin + '/manage/',
}

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