refactor: 租户/模板解析收敛到 hjc-java 单一后端,移除 websopy/server 依赖

- appApiBase 指向 hjc-java(hjc.sitelnk.cn 域名→租户解析、模板映射、订阅检查)
- 删除死配置 NUXT_PUBLIC_SERVER_API_BASE(代码中零消费)
- fileServerBase 改从 APP_API_BASE 推导(原从 server.websoft.top 推导)
- preconnect/dns-prefetch 指向 hjc-api 与文件源站
- .env.example/README 同步

验证:本地 node .output 预览,Host=hjc.sitelnk.cn 的 /api/site/info
经 hjc-java 解析成功返回站点信息(code=0)——租户解析链不再依赖任何外部服务。
This commit is contained in:
2026-09-24 10:24:16 +08:00
parent d360998559
commit 1cbc913262
5 changed files with 20 additions and 32 deletions
+6 -10
View File
@@ -23,19 +23,16 @@ const forceTemplateId = process.env.NUXT_PUBLIC_FORCE_TEMPLATE_ID || ''
// 站点名称覆盖:设置后优先于后端 AppProduct / CMS 返回值(多用于本地调试或强制品牌名)
const siteName = process.env.NUXT_PUBLIC_SITE_NAME || ''
const serverApiBase =
process.env.NUXT_PUBLIC_SERVER_API_BASE ||
'https://server.websoft.top/api'
const modulesApiBase =
process.env.NUXT_PUBLIC_MODULES_API_BASE ||
'https://hjc-api.websoft.top/api'
const appApiBase =
process.env.NUXT_PUBLIC_APP_API_BASE ||
'https://websopy-api.websoft.top'
'https://hjc-api.websoft.top'
const fileServerBase =
process.env.NUXT_PUBLIC_FILE_SERVER_BASE ||
getOrigin(serverApiBase) ||
'https://server.websoft.top'
getOrigin(appApiBase) ||
'https://hjc-api.websoft.top'
const baseDomain =
process.env.NUXT_PUBLIC_BASE_DOMAIN || 'shoplnk.cn'
// 多主域清单:子域名租户解析支持的主域(逗号分隔)。
@@ -79,11 +76,11 @@ export default defineNuxtConfig({
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
// 提前与内容/接口源站建立连接,降低首字节与图片加载延迟
{ rel: 'preconnect', href: 'https://server.websoft.top', crossorigin: '' },
// 提前与接口/图片源站建立连接,降低首字节与图片加载延迟
{ rel: 'preconnect', href: 'https://hjc-api.websoft.top', crossorigin: '' },
{ rel: 'dns-prefetch', href: 'https://server.websoft.top' },
{ rel: 'dns-prefetch', href: 'https://hjc-api.websoft.top' },
{ rel: 'preconnect', href: 'https://file.wsdns.cn', crossorigin: '' },
{ rel: 'dns-prefetch', href: 'https://file.wsdns.cn' },
// 思源黑体(Noto Sans SC,SIL 开源许可,版权无忧)网页字体,全站统一字体
{ rel: 'preconnect', href: 'https://fonts.googleapis.cn' },
{ rel: 'preconnect', href: 'https://fonts.gstatic.cn', crossorigin: '' },
@@ -120,7 +117,6 @@ export default defineNuxtConfig({
templateId,
forceTemplateId,
siteName,
serverApiBase,
modulesApiBase,
appApiBase,
fileServerBase,