sync 时线上 Wiki 的 Architecture-and-Code-Map、Business-Rules-and-Glossary、SYB-ERP-Interface-Contract 三页缺少 #343 的内容,而 main 的镜像已含 #343 描述(疑为直接改镜像未先改 Wiki,或 Wiki 被覆盖)。若按 Wiki 同步会把 #343 文档改回旧内容,因此本单未提交这三页镜像。需要把 #343 的内容补回线上 Wiki 后再同步。
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
来源与原始需求摘要
http://122.228.200.167:9527/显示 go-admin 默认欢迎页而非 Admin 后台;已在线上热修(nginx 配置恢复为旧服务器写法)。根因
server/app/admin/router/sys_router.go注册r.GET("/", apis.GoAdmin)(go-admin 欢迎页);前端 SPA 仅通过InitSPARouter的 NoRoute 兜底提供,/永远命中欢迎页。/home/goauto/current/dist、location = /返回 index.html,其余try_files $uri @goauto_backend;该配置只存在于旧服务器文件,docs/13-deployment-and-operations.md仅一句「Nginx 同时承载 Admin 静态资源并反向代理 GoAuto API」,无配置全文。迁移时新配置写成全部proxy_pass,首页即变欢迎页。目标
id="app"且不含「GO-ADMIN欢迎您」、SPA 路由、静态资源、验证码 JSON、业务接口未登录 401 JSON)、迁移清单(nginx、dist、goauto.env、systemd、数据库、定时任务)、本次迁移与热修记录。GOAUTO_WEB_DIST(或默认dist)下存在index.html时,GET /返回 SPA index.html;否则保留 go-admin 欢迎页(开发环境行为不变)。补测试。非目标
验收
harness.py sync与sync --check通过,镜像提交。GET /返回 index.html;无 dist 时仍为欢迎页;API 路径行为不变——测试覆盖;go build/go vet/相关测试通过。--no-ff合并提交。风险
设计证据
文档影响
Deployment-and-Operations(docs/13-deployment-and-operations.md 镜像)。实施回写(2026-09-28)
线上热修(已完成):122.228.200.167 的
/www/server/panel/vhost/nginx/goauto-9527.conf恢复为旧机写法(root 指向 dist、location = /返回 index.html、其余try_files $uri @goauto_backend),保留default_server/server_name/allow all;备份goauto-9527.conf.bak-20260928150822;nginx -t通过后 reload。外网按内容验收:/与/login、/goauto/syb-products返回 Admin index.html(含id="app"),/js/…200,/api/v1/captchaJSON code=200,/api/admin/v1/yeeke-returns未登录 JSON 401。分支:
fix/346-root-serves-spa(基于 main9dace6a),已推送,未合并。代码根治
0b01b92spa.go抽出spaIndex()与registerRootRoute();sys_router.go改为调用registerRootRoute。存在dist/index.html时GET /返回 SPA;无 dist 时保持原行为(非 prod 欢迎页、prod 不注册)。TestRootServesSPAWhenDistExists(dev/test/prod 三种模式)、TestRootWithoutDistKeepsPreviousBehaviour;app/admin/router全部测试通过;go build ./...、go vet通过;改动文件 gofmt 干净。文档(Wiki-first)
c13dcd3Deployment-and-Operations由9c10d971更新为3a76e16d,在线回读内容一致;harness.py sync与sync --check通过;只提交docs/13-deployment-and-operations.md镜像。发现的问题(未处理,需决定)
sync时线上 Wiki 的Architecture-and-Code-Map、Business-Rules-and-Glossary、SYB-ERP-Interface-Contract三页缺少 #343 的内容,而 main 的镜像已含 #343 描述(疑为直接改镜像未先改 Wiki,或 Wiki 被覆盖)。若按 Wiki 同步会把 #343 文档改回旧内容,因此本单未提交这三页镜像。需要把 #343 的内容补回线上 Wiki 后再同步。未做
状态:待验收。
验收(2026-09-28)
用户确认:「合并」。
fix/346-root-serves-spa以--no-ff合并提交bce4897(merge: serve Admin SPA at / and document nginx deployment (#346))并入 main;合并前 main 仍为9dace6a,测试结果沿用。Deployment-and-Operationsrevision3a76e16d已在待验收前同步,无需重复。状态:验收通过,关闭。