赫艾前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.9 KiB

5 years ago
3 weeks ago
5 years ago
3 weeks ago
3 weeks ago
3 weeks ago
5 years ago
  1. /**
  2. * 生产环境
  3. */
  4. ;(function () {
  5. window.SITE_CONFIG = {};
  6. /**
  7. * 部署站点打包前只改此常量 从下面两套完整配置中选一套生效 - rqrq
  8. * 可选值'苏州' | '国外'
  9. */
  10. var DEPLOY_SITE = '苏州';
  11. // 两套完整配置(baseUrl、静态资源、LODOP 授权均可分别填写)- rqrq
  12. var PRESETS = {
  13. '苏州': {
  14. baseUrl: 'http://192.168.2.172:9090',
  15. printAssetBaseUrl: 'http://192.168.2.172:80/print',
  16. uploadBaseUrl: 'http://192.168.2.172:80/upload/',
  17. sopFileBaseUrl: 'http://192.168.2.172:80/sopFile/',
  18. lodopLicenseStr1: '',
  19. lodopLicenseStr2: 'AF8A5800B823CC8E18BCF67B925E7BF0',
  20. lodopLicenseStr3: '',
  21. lodopLicenseStr4: ''
  22. },
  23. '国外': {
  24. baseUrl: 'http://192.168.1.88:9090',
  25. printAssetBaseUrl: 'http://192.168.1.88:82/print',
  26. uploadBaseUrl: 'http://192.168.1.88:82/upload/',
  27. sopFileBaseUrl: 'http://192.168.1.88:82/sopFile/',
  28. lodopLicenseStr1: '',
  29. lodopLicenseStr2: '15F0BE661E7F39FD7491843CB2514F69',
  30. lodopLicenseStr3: '',
  31. lodopLicenseStr4: ''
  32. }
  33. };
  34. var cfg = PRESETS[DEPLOY_SITE] || PRESETS['苏州'];
  35. window.SITE_CONFIG['baseUrl'] = cfg.baseUrl;
  36. window.SITE_CONFIG['printAssetBaseUrl'] = cfg.printAssetBaseUrl;
  37. window.SITE_CONFIG['uploadBaseUrl'] = cfg.uploadBaseUrl;
  38. window.SITE_CONFIG['sopFileBaseUrl'] = cfg.sopFileBaseUrl;
  39. window.SITE_CONFIG['lodopLicenseStr1'] = cfg.lodopLicenseStr1;
  40. window.SITE_CONFIG['lodopLicenseStr2'] = cfg.lodopLicenseStr2;
  41. window.SITE_CONFIG['lodopLicenseStr3'] = cfg.lodopLicenseStr3;
  42. window.SITE_CONFIG['lodopLicenseStr4'] = cfg.lodopLicenseStr4;
  43. // cdn地址 = 域名 + 版本号
  44. window.SITE_CONFIG['domain'] = './'; // 域名
  45. window.SITE_CONFIG['version'] = ''; // 版本号(年月日时分)
  46. window.SITE_CONFIG['cdnUrl'] = window.SITE_CONFIG.domain + window.SITE_CONFIG.version;
  47. })();