fe17886ac4
- 车辆 / 洗车 / 加油 / 充电 / 保养 / 保险 完整 CRUD + 软删 - AI 截图识别(5 类型 OCR schema):OpenAI 兼容 + MiniMax M3 - 化学品 / Grocy 实例对接 + 库存镜像同步 - 仪表盘:30 天频次 + 健康度 + 同比环比 + 油价趋势 + 年均养护 - 月度报表:Excel 6 sheet + PDF - PWA:manifest / SW / 离线缓存 / iOS 引导 - 安全:bcrypt + CSRF + 登录锁定(IP/用户/全局三级)+ 401 自动跳登录 + 表单草稿 - 高 ROI 8 功能:里程/提醒/成本/搜索/标签/通知/同比/成就 - 3 个新 migration(0016/0017/0018)+ 18 个迁移全幂等 - 101/101 测试通过(含 ipRateLimit / CSRF / retry / stats / tags / notifications) - 部署:宝塔面板文档 + PM2 + Nginx
2.0 KiB
2.0 KiB
Debug Session: page-loading-spinner
Status: [OPEN] Symptom: http://localhost:5173/ shows a loading spinner / "转圈圈" - page never finishes loading User-reported: 2026-06-19 Environment:
- macOS, Vite dev server on :5173 (PID 28109), Node server on :8787 (PID 52581)
- DB: MySQL @ 162.14.110.130:33306 (carlog) —
.setup_donepresent - API health: 200 OK, /api/auth/me → 401 (expected for unauthenticated)
- HTML / main.js / proxied /api endpoints all return quickly
Hypotheses
- H1 — Auth bootstrap redirect loop:
/api/auth/mereturns 401, the axios 401 interceptor fireslocation.href = '/login?redirect=%2F', hard navigation reloads page, the same chain runs again, the browser tab keeps showing the loading state of a SPA re-mount. - H2 — Home.vue
loading = truestuck: User is already logged in (session cookie valid), lands on/(Home), the 6 parallel API calls inHome.vue#onMountednever resolve (one of them hangs →Promise.allnever settles →loading.valuestaystrue→ "加载中…" rendered forever). - H3 — Vite HMR / module error: A recent code change in client broke a module, throwing on import; the Vue app never mounts, only
<div id="app"></div>is visible and the browser tab shows loading. - H4 — Login page itself renders a spinner: After redirect to
/login, something on the Login page (an external CSS or font request, etc.) keeps the page in a "spinning" state perceived as still loading. - H5 — Server DB query hanging for Home's API: One of the 6 endpoints (e.g.
/stats/overview,/dashboard/extra) hits a long-running SQL on the remote MySQL; the request times out at 15s, butloadingmay not flip until all settle — perceived as a permanent spinner.
Plan
- Step 1: Start debug server (collector) and add light instrumentation
- Step 2: Reload the page; collect runtime evidence
- Step 3: Pick the right hypothesis and apply a minimal fix
- Step 4: Re-run and compare pre/post logs
- Step 5: Cleanup on user confirmation