config.js 1.56 KB
var host = window.location.protocol + '//' + window.location.hostname
// 当前后端不在同一个服务器时,需要指定host地址
// var host = 'http://192.168.0.9'
// 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'
  var modulePort = '6799'
  if (!combine) {
    modulePort = defaultModulePortMap[module]
  }
  return host + ':' + modulePort
}
window.context = {
  manage: host + ':22581/mvue', //管理端页面
  front: host + ':22581/fvue', //前端页面
  mobile: host + ':22581/mobile', //手机端页面
  form: getModuleRootUrl('form'),
  portal: getModuleRootUrl('portal'),
  bpmRunTime: getModuleRootUrl('bpmRunTime'),
  bpmModel: getModuleRootUrl('bpmModel'),
  uc: getModuleRootUrl('uc'),
  auth: getModuleRootUrl('auth'),
}
// 单点配置
window.ssoConfig = {
  mode: '', // 空则不使用单点  支持的模式有  cas oauth basic
  url: 'http://192.168.1.115:8093/oauth/authorize',
  clientId: 'eip7', // oauth模式下需要提供
  logout: 'http://192.168.1.115:8093/logout',
}
//是否启用扫码登录配置
window.scanCodeConfig = {
  enable: true, //是否启用扫码登录
  //需要启用的第三方应用key的集合,配置的key必须是'wechat', 'dingding', 'flyBook'中的一个或多个
  // mode: ['dingding', 'wechat', 'flyBook'],
  mode: ['dingding'],
}