From 07112fcd374288656c9b8217e3640f8c2fb0247a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=B8=E7=86=9F=E5=90=B4=E5=BD=A6=E7=A5=96?= Date: Tue, 24 Mar 2026 10:12:12 +0800 Subject: [PATCH] =?UTF-8?q?2=E5=A5=97=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/config/index-prod.js | 49 ++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/static/config/index-prod.js b/static/config/index-prod.js index 3b7be44..9e0750b 100644 --- a/static/config/index-prod.js +++ b/static/config/index-prod.js @@ -4,19 +4,46 @@ ;(function () { window.SITE_CONFIG = {}; - // api接口请求地址 - window.SITE_CONFIG['baseUrl'] = 'http://192.168.2.172:9090'; + /** + * 部署站点:打包前只改此常量 — 从下面两套完整配置中选一套生效 - rqrq + * 可选值:'苏州' | '国外' + */ + var DEPLOY_SITE = '苏州'; - // LODOP 打印图片根路径(无末尾/)- rqrq 这三个地址的端口 国外是82 苏州是80!!!! - window.SITE_CONFIG['printAssetBaseUrl'] = 'http://192.168.2.172:80/print'; - window.SITE_CONFIG['uploadBaseUrl'] = 'http://192.168.2.172:80/upload/'; - window.SITE_CONFIG['sopFileBaseUrl'] = 'http://192.168.2.172:80/sopFile/'; + // 两套完整配置(baseUrl、静态资源、LODOP 授权均可分别填写)- rqrq + var PRESETS = { + '苏州': { + baseUrl: 'http://192.168.2.172:9090', + printAssetBaseUrl: 'http://192.168.2.172:80/print', + uploadBaseUrl: 'http://192.168.2.172:80/upload/', + sopFileBaseUrl: 'http://192.168.2.172:80/sopFile/', + lodopLicenseStr1: '', + lodopLicenseStr2: 'AF8A5800B823CC8E18BCF67B925E7BF0', + lodopLicenseStr3: '', + lodopLicenseStr4: '' + }, + '国外': { + baseUrl: 'http://192.168.1.88:9090', + printAssetBaseUrl: 'http://192.168.1.88:82/print', + uploadBaseUrl: 'http://192.168.1.88:82/upload/', + sopFileBaseUrl: 'http://192.168.1.88:82/sopFile/', + lodopLicenseStr1: '', + lodopLicenseStr2: '15F0BE661E7F39FD7491843CB2514F69', + lodopLicenseStr3: '', + lodopLicenseStr4: '' + } + }; - // LODOP 控件授权 SET_LICENSES 四段 - rqrq - window.SITE_CONFIG['lodopLicenseStr1'] = ''; - window.SITE_CONFIG['lodopLicenseStr2'] = 'AF8A5800B823CC8E18BCF67B925E7BF0'; - window.SITE_CONFIG['lodopLicenseStr3'] = ''; - window.SITE_CONFIG['lodopLicenseStr4'] = ''; + var cfg = PRESETS[DEPLOY_SITE] || PRESETS['苏州']; + + window.SITE_CONFIG['baseUrl'] = cfg.baseUrl; + window.SITE_CONFIG['printAssetBaseUrl'] = cfg.printAssetBaseUrl; + window.SITE_CONFIG['uploadBaseUrl'] = cfg.uploadBaseUrl; + window.SITE_CONFIG['sopFileBaseUrl'] = cfg.sopFileBaseUrl; + window.SITE_CONFIG['lodopLicenseStr1'] = cfg.lodopLicenseStr1; + window.SITE_CONFIG['lodopLicenseStr2'] = cfg.lodopLicenseStr2; + window.SITE_CONFIG['lodopLicenseStr3'] = cfg.lodopLicenseStr3; + window.SITE_CONFIG['lodopLicenseStr4'] = cfg.lodopLicenseStr4; // cdn地址 = 域名 + 版本号 window.SITE_CONFIG['domain'] = './'; // 域名