diff --git a/.env.dev b/.env.dev index 50e970f..7d7390d 100644 --- a/.env.dev +++ b/.env.dev @@ -5,7 +5,7 @@ # 规避后端 CAS 过滤器不回 CORS 头导致的跨域拦截;SSO/基础平台用真实环境 VITE_BASE_HOST=http://base.yunhaixingtong.com VITE_SSO_HOST=http://sso.yunhaixingtong.com -# 留空 → serviceHost 走同源相对 /api(经 vite 代理到本地后端 8105);填绝对地址会绕过代理直连该域 +# 留空 → serviceHost 走同源相对 /api(经 vite 代理到本地后端 8107);填绝对地址会绕过代理直连该域 VITE_SERVICE_HOST=http://base.yunhaixingtong.com/profession/ VITE_ZIYUANKU_HOST=https://base.bestsch.com/BschZyk VITE_ZHUANXIANG_HOST=https://base.bestsch.com/BschZncpd diff --git a/.gitignore b/.gitignore index 2e36ff0..52f7027 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,10 @@ yarn.lock # scratch .temp +# 构建产物备份目录(本地留存,不入库) +dist_old/ +dist_old2/ + # vite 构建时间戳临时文件 vite.config.ts.timestamp-*.mjs diff --git a/src/components/layout.vue b/src/components/layout.vue index 818e7b7..3cf94f1 100644 --- a/src/components/layout.vue +++ b/src/components/layout.vue @@ -166,6 +166,18 @@ function linkHomePage() { window.location.href = "/"; } } + +/* 发展首页地址:线上 front 与 console 同 contextPath 平级部署(/{ctx}/console/ → /{ctx}/front/); + 本地 dev(根路径无段)跳 front dev 服务 8081 */ +const frontHomeUrl = (() => { + const seg = window.location.pathname.split("/").filter(Boolean); + const base = seg.length >= 2 ? `${window.location.origin}/${seg[0]}/front/` : "http://localhost:8081/"; + return base + "#/home"; +})(); + +const gotoFrontHome = () => { + window.open(frontHomeUrl, "_blank"); +};