4da8b39ecbe8bc871ae70d47588ca33f83f9d062.svn-base 1.2 KB

123456789101112131415161718192021
  1. export let hostUrl,reportHosturl
  2. if(window.location.href.indexOf('localhost') > -1){ //本地调试
  3. // hostUrl = 'http://pdc.goldenwater.com.cn'
  4. // // hostUrl = 'http://61.154.12.112:9900/pdcApi'
  5. reportHosturl = 'http://pdc.goldenwater.com.cn'
  6. hostUrl = 'http://localhost:8500'
  7. }else if(window.location.href.indexOf('10.1.102.') > -1){ //测试环境
  8. hostUrl = `${window.location.protocol}//${window.location.hostname}:${window.location.port}`
  9. reportHosturl = 'http://pdc.goldenwater.com.cn'
  10. }else if(window.location.port){ //带端口号
  11. hostUrl = `${window.location.protocol}//${window.location.hostname}:${window.location.port}`
  12. reportHosturl = `${window.location.protocol}//${window.location.hostname}:${window.location.port}`
  13. }else{
  14. hostUrl = `${window.location.protocol}//${window.location.hostname}`
  15. reportHosturl = `${window.location.protocol}//${window.location.hostname}`
  16. }
  17. export let curAdcode_long,curAdcode_short
  18. // curAdcode_long 行政区划编码全 curAdcode_short 取行政区划编码前六位
  19. curAdcode_long = localStorage.getItem('currentRlcode') ? localStorage.getItem('currentRlcode') : '000000000000'
  20. curAdcode_short = curAdcode_long.substr(0,6)