config.js 1.8 KB

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