feat(api): 新增 cms-api API 域名支持并切换幻灯片广告接口域名

- 配置文件 env.js 中新增 CMS_API_URL,三个环境均统一配置
- app.ts 导出 CmsBaseUrl,用于 cms-api 相关请求
- cmsAd 模块接口调用统一改为通过 CmsBaseUrl 拼接完整 cms-api 路径
- 幻灯片广告相关接口走独立 cms-api 域名,保证数据隔离
- 更新工作备忘录,补充 API 域名配置与幻灯片广告调用说明
This commit is contained in:
2026-07-27 12:42:27 +08:00
parent 0cc0d089e9
commit f1c0349f64
4 changed files with 16 additions and 6 deletions

View File

@@ -1,7 +1,8 @@
import { API_BASE_URL, SERVER_API_URL } from './env'
import { API_BASE_URL, SERVER_API_URL, CMS_API_URL } from './env'
export const TenantId = '10611'
export const TenantName = '鑫龙家电'
export const BaseUrl = API_BASE_URL
export const ServerBaseUrl = SERVER_API_URL
export const CmsBaseUrl = CMS_API_URL
export const Version = 'v1.0.0'

View File

@@ -4,18 +4,21 @@ export const ENV_CONFIG = {
development: {
API_BASE_URL: 'https://shop-api.websoft.top/api',
SERVER_API_URL: 'https://server.websoft.top/api',
CMS_API_URL: 'https://cms-api.websoft.top/api',
APP_NAME: '鑫龙家电',
DEBUG: 'true',
},
test: {
API_BASE_URL: 'https://shop-api.websoft.top/api',
SERVER_API_URL: 'https://server.websoft.top/api',
CMS_API_URL: 'https://cms-api.websoft.top/api',
APP_NAME: '鑫龙家电',
DEBUG: 'true',
},
production: {
API_BASE_URL: 'https://shop-api.websoft.top/api',
SERVER_API_URL: 'https://server.websoft.top/api',
CMS_API_URL: 'https://cms-api.websoft.top/api',
APP_NAME: '鑫龙家电',
DEBUG: 'false',
},
@@ -25,4 +28,4 @@ export function getEnvConfig() {
return ENV_CONFIG[CURRENT_ENV] || ENV_CONFIG.development
}
export const { API_BASE_URL, SERVER_API_URL, APP_NAME, DEBUG } = getEnvConfig()
export const { API_BASE_URL, SERVER_API_URL, CMS_API_URL, APP_NAME, DEBUG } = getEnvConfig()