config.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // var host = window.location.protocol + '//' + window.location.hostname
  2. // 当前后端不在同一个服务器时,需要指定host地址
  3. // var host = 'http://10.7.13.26'
  4. var host = 'http://localhost'
  5. // combine为true时五合一部署, 为false时分五个服务部署
  6. var combine = true
  7. var gateway = '8280/stage-api'
  8. var defaultModulePortMap = {
  9. form: gateway +'/form',
  10. portal: gateway +'/portal',
  11. bpmRunTime: gateway +'/bpmRunTime',
  12. bpmModel: gateway +'/bpmModel',
  13. uc: gateway +'/uc',
  14. auth: gateway +'/auth',
  15. commonSign: gateway,
  16. }
  17. window.getModuleRootUrl = function (module) {
  18. // 默认是全部服务合一的端口
  19. var modulePort = '8089'
  20. if (!combine) {
  21. modulePort = defaultModulePortMap[module]
  22. }
  23. return host + ':' + modulePort
  24. }
  25. window.context = {
  26. manage: host + ':8280/mvue', //管理端页面
  27. front: host + ':8280/front', //前端页面
  28. mobile: host + ':8280/mobile', //手机端页面
  29. form: getModuleRootUrl('form'),
  30. portal: getModuleRootUrl('portal'),
  31. bpmRunTime: getModuleRootUrl('bpmRunTime'),
  32. bpmModel: getModuleRootUrl('bpmModel'),
  33. uc: getModuleRootUrl('uc'),
  34. auth: getModuleRootUrl('auth'),
  35. commonSign: 'http://10.7.14.215:8280/stage-api/',
  36. //后台接口是新开的端口 8082
  37. // costAudit: host + ':8082'
  38. }
  39. // 单点配置
  40. window.ssoConfig = {
  41. // mode: 'oauth', // 空则不使用单点 支持的模式有 cas oauth basic
  42. // url: 'http://10.7.14.215:8280/auth',
  43. // clientId: 'workbench', // oauth模式下需要提供
  44. // logout: 'http://10.7.14.215:8280/auth'
  45. }