config.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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://116.204.117.33' // 测试
  6. // var host = 'http://b463f4b7.natappfree.cc' // 后端服务海鹏
  7. // var host = 'http://5jrgep.ipx.wanziwk.cn' // 后端服务译文
  8. // var host = 'http://127.0.0.1' // 后端服务译文
  9. var host = 'http://1.71.9.215'
  10. // var host = 'http://5jrgep.ipx.wanziwk.cn'
  11. // combine为true时五合一部署, 为false时分五个服务部署
  12. var combine = true
  13. // var gateway = '8280/stage-api'
  14. var gateway = '9506/stage-api'
  15. var defaultModulePortMap = {
  16. form: gateway + '/form',
  17. portal: gateway + '/portal',
  18. bpmRunTime: gateway + '/bpmRunTime',
  19. bpmModel: gateway + '/bpmModel',
  20. uc: gateway + '/uc',
  21. auth: gateway + '/auth',
  22. commonSign: gateway,
  23. }
  24. window.getModuleRootUrl = function (module) {
  25. // 默认是全部服务合一的端口
  26. //var modulePort = '8089' // 以前
  27. var modulePort = '9506' // 基本用这个
  28. // var modulePort = '8088' //测试
  29. // var modulePort = '9801'
  30. // var modulePort = ''
  31. if (!combine) {
  32. modulePort = defaultModulePortMap[module]
  33. }
  34. // return "http://1.71.9.215:9506";
  35. // return "http://192.168.1.144:9506"
  36. return host + ':' + modulePort
  37. // return host + modulePort
  38. }
  39. window.context = {
  40. manage: host + ':8280/mvue', //管理端页面
  41. front: host + ':8280/front', //前端页面
  42. mobile: host + ':8280/mobile', //手机端页面
  43. form: getModuleRootUrl('form'),
  44. portal: getModuleRootUrl('portal'),
  45. bpmRunTime: getModuleRootUrl('bpmRunTime'),
  46. bpmModel: getModuleRootUrl('bpmModel'),
  47. uc: getModuleRootUrl('uc'),
  48. auth: getModuleRootUrl('auth'),
  49. commonSign: 'http://10.7.14.215:8280/stage-api/',
  50. //后台接口是新开的端口 8082
  51. // costAudit: host + ':8082'
  52. }
  53. // 单点配置
  54. window.ssoConfig = {
  55. // mode: 'oauth', // 空则不使用单点 支持的模式有 cas oauth basic
  56. // url: 'http://10.7.14.215:8280/auth',
  57. // clientId: 'workbench', // oauth模式下需要提供
  58. // logout: 'http://10.7.14.215:8280/auth'
  59. }