// 产品的开发环境
// const baseUrl = "http://jiucaiyunbpm.jiucaiyun.cn/bpabpmapi"
// const bpmurl = "http://jiucaiyunbpm.jiucaiyun.cn/bpabpmapi"
// const pageurl = 'http://jiucaiyunbpm.jiucaiyun.cn/jcybpm'

let urlRes = '/bpabpmapi';
let htmlUrl = '/jcybpm';
if(window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1' || window.location.hostname === '0.0.0.0'){
  urlRes = 'http://huawei6.jiucaiyun.cn/hangtianpocapi/'
  htmlUrl = 'http://test2.jiucaiyun.cn/jcybpmdev3'
  // urlRes = 'http://test1.jiucaiyun.cn/bpabpmtest2api'
  // htmlUrl = 'http://test1.jiucaiyun.cn/jcybpmtest2'
} else {
  const urlList = {
    jcybpmtest1: '/bpabpmtest1api',
    jcybpmtest2: '/bpabpmtest2api',
    jcybpmtest3: '/bpabpmtest3api',
    jcybpmtest4: '/bpabpmtest4api',
    jcybpmtest5: '/bpabpmtest5api',
    jcybpmdev1: '/bpabpmdev1api',
    jcybpmdev2: '/bpabpmdev2api',
    jcybpmdev3: '/bpabpmdev3api',
    jcybpmdev4: '/bpabpmdev4api',
    jcybpmdev5: '/bpabpmdev5api',
    jcypocbpm: '/bpabpmpocapi',
    hangtianpoc: '/hangtianpocapi'
    // jcybpm: '/bpabpmapi'
  }
  Object.entries(urlList).map(v=>{
      if(window.location.pathname.includes(v[0])){
        htmlUrl = '/' + v[0]
        urlRes = v[1]
      }
  })
}

const baseUrl = urlRes
const bpmurl = urlRes
const pageurl = htmlUrl

// 产品的qa环境
// var baseUrl = "http://jiucaiyunbpmqa.jiucaiyun.cn/bpabpmapi"
// var bpmurl = "http://jiucaiyunbpmqa.jiucaiyun.cn/bpabpmapi"
// var pageurl = 'http://jiucaiyunbpmqa.jiucaiyun.cn/jcybpm'


// poc环境
// var baseUrl = "http://jiucaiyunbpmpoc.jiucaiyun.cn/bpabpmpocapi"
// var bpmurl = "http://jiucaiyunbpmpoc.jiucaiyun.cn/bpabpmpocapi"
// var pageurl = 'http://jiucaiyunbpmpoc.jiucaiyun.cn/jcypocbpm'

// pr环境
// var baseUrl = "http://www.jiucaiyun.cn/bpabpmapi"
// var bpmurl = 'http://www.jiucaiyun.cn/jcybpm'
// var pageurl = 'http://www.jiucaiyun.cn/jcybpm'

// pal 开发环境
// var baseUrl = "http://palbpm.jiucaiyun.cn/bpabpmapi"
// var bpmurl = "http://palbpm.jiucaiyun.cn/bpabpmapi"
// var pageurl = 'http://palbpm.jiucaiyun.cn/jcybpm'

// 通用
// var baseUrl = window.location.origin + (window.location.origin.includes("poc") ? "/bpabpmpocapi" : "/bpabpmapi")
// var bpmurl = window.location.origin + (window.location.origin.includes("poc") ? "/bpabpmpocapi" : "/bpabpmapi")
// var pageurl = window.location.origin + (window.location.origin.includes("poc") ? "/jcypocbpm" : "/jcybpm")


export {
  baseUrl,
  bpmurl,
  pageurl
}
