/* url配置 */
window.PLATFROM_CONFIG = {
  baseNewUrl: '', //登录前的http请求地址
  baseURLCA: '', // 登录后的http请求地址
  appKeyString: 'test', //appSecret
  appId: 'test', //appid
  baggageMessageURL: '/openApi/query',
  getBase64: 'http://10.211.67.163:8083/getBase64',
  editRule: /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[`!@#$%^&*()_+{}":?><`,./';=-])[\da-zA-Z`!@#$%^&*()_+{}":?><`,./';=-]{8,}$/
}

const baseNewUrl = window.location.hostname
// const baseNewUrl = '10.211.67.177'
switch (baseNewUrl) {
  case '10.211.66.23':
    PLATFROM_CONFIG = {
      ...PLATFROM_CONFIG,
      baseNewUrl: 'http://10.211.66.23:8082',
      baseURLCA: 'http://10.211.66.23:8082',
      fileUrl: 'http://10.211.66.23:8082',
      expressUrl: 'http://10.211.67.177:8043',
      tempUrl: 'http://10.211.67.163:16300', // 1.0临时地址
      tempToken: 'bb1bcfcb336b40e9b8602e808b053c3b', // 1.0临时token
      tempUserId: '1656481036109',
      tempAppToken: '2ecbda35d72c4ae89294464629f29f35',
      hasStaticRoutes: true,
    }
    break
  case '10.211.67.177':
    PLATFROM_CONFIG = {
      ...PLATFROM_CONFIG,
      baseNewUrl: 'http://10.211.67.177:8043',
      baseURLCA: 'http://10.211.67.177:8043',
      fileUrl: 'http://10.211.67.177:8043',
      expressUrl: 'http://10.211.67.177:8043',
      tempUrl: 'http://10.211.67.177:8043', // 1.0临时地址
      tempToken: 'bb1bcfcb336b40e9b8602e808b053c3b', // 1.0临时token
      tempUserId: '1656481036109',
      tempAppToken: '2ecbda35d72c4ae89294464629f29f35',
      hasStaticRoutes: true,
    }
    break
  case '10.199.7.20':
    PLATFROM_CONFIG = {
      ...PLATFROM_CONFIG,
      baseNewUrl: 'http://10.199.7.20:8083',
      baseURLCA: 'http://10.199.7.20:8083',
      hasStaticRoutes: true,
    }
    break
  case 'localhost':
    PLATFROM_CONFIG = {
      ...PLATFROM_CONFIG,
      baseNewUrl: 'http://120.26.64.82:9500',
      baseURLCA: 'http://120.26.64.82:9500',
      fileUrl: 'http://120.26.64.82:9500',
      expressUrl: 'http://120.26.64.82:9500',
      tempUrl: 'http://10.211.67.163:16300', // 1.0临时地址
      tempToken: 'bb1bcfcb336b40e9b8602e808b053c3b', // 1.0临时token
      tempUserId: '1656481036109',
      tempAppToken: '2ecbda35d72c4ae89294464629f29f35',
      hasStaticRoutes: true,
    }
    break
  default:
    PLATFROM_CONFIG = {
      ...PLATFROM_CONFIG,
      baseNewUrl: 'http://120.26.64.82:9500',
      baseURLCA: 'http://120.26.64.82:9500',
    }
    break
}

/* 轮询间隔 */
window.LOOP_INTERVAL = {
  arrivalTable: 30 * 1000, // 进港视图表格
  departureTable: 30 * 1000, // 离港视图表格
  transferArrivalTable: 30 * 1000, // 中转进港表格
  transferDepartureTable: 30 * 1000, // 中转离港表格
  baggageTrack: 30 * 1000, // 行李跟踪节点信息
  baggageDetails: 30 * 1000, // 行李详情表格
  baggageMessage: 30 * 1000, // 行李原始报文
}
