config.js 2.1 KB

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