sso.js 1.35 KB
var host = window.location.protocol + '//' + window.location.hostname
// 当前后端不在同一个服务器时,需要指定host地址
// var host = 'http://192.168.145.61'
// combine为true时五合一部署, 为false时分五个服务部署
var combine = true
var defaultModulePortMap = {
  form: '8082',
  portal: '8084',
  bpmRunTime: '8086',
  bpmModel: '8087',
  uc: '8088',
  auth: '8090',
}
window.getModuleRootUrl = function (module) {
  // 默认是全部服务合一的端口
  var modulePort = '22581'
  if (!combine) {
    modulePort = defaultModulePortMap[module]
  }
  return host + ':' + modulePort
}
window.context = {
  mobile: host + ':8082/mobile', //手机端页面
  form: getModuleRootUrl('form'),
  portal: getModuleRootUrl('portal'),
  bpmRunTime: getModuleRootUrl('bpmRunTime'),
  bpmModel: getModuleRootUrl('bpmModel'),
  uc: getModuleRootUrl('uc'),
  auth: getModuleRootUrl('auth'),
}
// 单点配置
window.ssoConfig = {
  mode: '', // 移动端通常使用:jwt
  url: 'http://www.hotent.org:7080/cas',
  logout: 'http://www.hotent.org:7080/cas/logout',
}

//app
window.appConfig = {
  versionUrl: 'http://www.hotent.org:9998/portal/main/v1/getAndroidAppVersion',
  apkUrl: 'http://www.hotent.org:9997/app/eip.apk',
}

window.captcha = {
  // 是否启用图形验证码 0-不启用;1-启用且限制失败次数;2-一直启用
  enabled: 2,
}