sso.js 1.6 KB

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