export let hostUrl, reportHosturl, previewUrl, fileUrl;

if (
  window.location.href.indexOf('localhost') > -1 ||
  window.location.href.indexOf('10.1.102.') > -1
) {
  // hostUrl = 'http://sljg.jxwrd.gov.cn:8086/pdcApi'
  // reportHosturl = 'http://sljg.jxwrd.gov.cn:8086'
  // hostUrl = 'https://sljg.jxwrd.gov.cn:9900'
  // hostUrl = 'http://192.168.0.112:8400'
  // reportHosturl = 'http://192.168.0.112:8400'
  // previewUrl = 'http://192.168.0.112:8012/onlinePreview?url='
  // fileUrl = 'http://192.168.0.112:8012/'
  // previewUrl = 'http://sljg.jxwrd.gov.cn:9900/kkFileApi/onlinePreview?url='
  // fileUrl = 'http://localhost:8012'
  hostUrl =
    'http://my.jxwrd.gov.cn/modular-source/6ace62b8e2bb467d98286d260aebcef2/pdcApi';
  reportHosturl = 'https://sljg.jxwrd.gov.cn:9900';
  previewUrl =
    'http://my.jxwrd.gov.cn/modular-source/06dbeb04cf804068875db7ee8dca0be9/kkFileApi/onlinePreview?url=';
  fileUrl =
    'http://my.jxwrd.gov.cn/modular-source/06dbeb04cf804068875db7ee8dca0be9/kkFileApi';
} else if (window.location.port) {
  // hostUrl = `${window.location.protocol}//${window.location.hostname}:${window.location.port}/modular-source/6ace62b8e2bb467d98286d260aebcef2/pdcApi`;
  // reportHosturl = `${window.location.protocol}//${window.location.hostname}:${window.location.port}/modular-source/6ace62b8e2bb467d98286d260aebcef2/pdcApi`;
  // hostUrl = 'https://sljg.jxwrd.gov.cn:9900'
  // reportHosturl = 'https://sljg.jxwrd.gov.cn:9900'
  // previewUrl = 'https://sljg.jxwrd.gov.cn:9900/kkFileApi/onlinePreview?url='
  // fileUrl = 'http://localhost:8012'
  hostUrl =
    'http://my.jxwrd.gov.cn/modular-source/6ace62b8e2bb467d98286d260aebcef2/pdcApi';
  reportHosturl = 'https://sljg.jxwrd.gov.cn:9900';
  previewUrl =
    'http://my.jxwrd.gov.cn/modular-source/06dbeb04cf804068875db7ee8dca0be9/kkFileApi/onlinePreview?url=';
  fileUrl =
    'http://my.jxwrd.gov.cn/modular-source/06dbeb04cf804068875db7ee8dca0be9/kkFileApi';
} else {
  // hostUrl = `${window.location.protocol}//${window.location.hostname}/modular-source/6ace62b8e2bb467d98286d260aebcef2/pdcApi`;
  // reportHosturl = `${window.location.protocol}//${window.location.hostname}/modular-source/6ace62b8e2bb467d98286d260aebcef2/pdcApi`;
  // hostUrl = 'https://sljg.jxwrd.gov.cn:9900'
  // reportHosturl = 'https://sljg.jxwrd.gov.cn:9900'
  // previewUrl = 'https://sljg.jxwrd.gov.cn:9900/kkFileApi/onlinePreview?url='
  // fileUrl = 'http://localhost:8012'
  hostUrl =
    'http://my.jxwrd.gov.cn/modular-source/6ace62b8e2bb467d98286d260aebcef2/pdcApi';
  reportHosturl = 'https://sljg.jxwrd.gov.cn:9900';
  previewUrl =
    'http://my.jxwrd.gov.cn/modular-source/06dbeb04cf804068875db7ee8dca0be9/kkFileApi/onlinePreview?url=';
  fileUrl =
    'http://my.jxwrd.gov.cn/modular-source/06dbeb04cf804068875db7ee8dca0be9/kkFileApi';
}

export let curAdcode_long, curAdcode_short;

curAdcode_long = localStorage.getItem('currentRlcode')
  ? localStorage.getItem('currentRlcode')
  : '000000000000';
curAdcode_short = curAdcode_long.substr(0, 6);

// 111.75.205.68
