拆分 service 与前端大文件,修复 CORS 配置与格式问题

- 后端 internal/service 按职责拆分:
  fulfillment.go(1397→527)拆出 wallet/timeout/data/order/query/dashboard/shipnotify
  delivery.go(1124→801)拆出 upstream/link/state/helpers
  merchant.go(855→251)拆出 member/product/api_client/catalog/helpers
- 前端 MerchantCenter.tsx(1327→606)拆出 merchantCenterTabs/merchantCenterUtils
- docker-compose backend 透传 CORS_ALLOWED_ORIGINS
- CORS 白名单实现(config/router/README/.env.example 配套)
- 修复 gofmt 与文件尾部多余空行
This commit is contained in:
yml2213
2026-08-05 13:32:11 +08:00
parent 569109cd92
commit 2264851d5d
29 changed files with 2990 additions and 2606 deletions
+5
View File
@@ -30,6 +30,11 @@ DELIVERY_LINK_TTL_MINUTES=120
FULFILLMENT_PROCESSING_TIMEOUT_MINUTES=30
FULFILLMENT_TIMEOUT_SCAN_INTERVAL_SECONDS=60
# 跨域来源白名单(逗号分隔)。生产前后端同域(Caddy 统一入口)无需配置;
# 仅前后端分离部署时设置,例如:CORS_ALLOWED_ORIGINS=https://admin.example.com
# 为空时仅放行本地开发端口 localhost:15173 / 18080;不支持 "*"(与凭证模式冲突)。
# CORS_ALLOWED_ORIGINS=
# Docker 构建基础镜像;如镜像源不可用,可改为官方镜像或你的私有镜像源
POSTGRES_IMAGE=docker.m.daocloud.io/library/postgres:16-alpine
GO_BUILDER_IMAGE=docker.m.daocloud.io/library/golang:1.26-alpine