refactor(cms): 迁移CMS模块接口到独立cms-api服务

- 新增cmsRequest工具,基于request封装,默认baseURL为cms-api
- 改用cmsRequest替换所有cms相关请求,确保请求走独立域名
- 配置三环境新增CMS_API_BASE_URL及导出CmsBaseUrl常量
- 解决CMS接口走shop-api时返回404的问题,避免小程序域名白名单冲突
- 统一修改34个cms API模块的261处调用,保持接口行为一致
- 修复部分拼接全URL方式改为相对路径调用cmsRequest
- 更新注释说明并调整相关接口调用代码
- 兼容macOS sed替换问题,采用perl命令完成批量替换
This commit is contained in:
2026-08-11 11:04:40 +08:00
parent 2e80a49ca1
commit b4cd54e102
42 changed files with 450 additions and 370 deletions
+2 -1
View File
@@ -1,8 +1,9 @@
import { API_BASE_URL, SERVER_API_URL, WEBSOPY_API_BASE_URL } from './env'
import { API_BASE_URL, SERVER_API_URL, WEBSOPY_API_BASE_URL, CMS_API_BASE_URL } from './env'
export const TenantId = '5'
export const TenantName = '赛联小助手'
export const BaseUrl = API_BASE_URL
export const ServerBaseUrl = SERVER_API_URL
export const WebsopyBaseUrl = WEBSOPY_API_BASE_URL
export const CmsBaseUrl = CMS_API_BASE_URL
export const Version = 'v3.0.0'