feat(stores): add Pinia domain stores and update docs

Implement concrete Pinia stores for app UI and domain data instead of
placeholder re-exports, including seeded student records and snackbar state.

Refresh README guidance for components, plugins, and services to document the
current project structure, data flow, and usage conventions.feat(stores): add Pinia domain stores and update docs

Implement concrete Pinia stores for app UI and domain data instead of
placeholder re-exports, including seeded student records and snackbar state.

Refresh README guidance for components, plugins, and services to document the
current project structure, data flow, and usage conventions.
This commit is contained in:
skytek_xinliang
2026-05-05 11:54:19 +08:00
parent 6eab4d9744
commit b37f4363eb
23 changed files with 1531 additions and 1588 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ import { tokenService } from './token'
// 設計重點:
// - Request:自動注入 token(從 localStorage 讀取)
// - 使用 tokenService 作為單一來源,避免 interceptor 直接 import Pinia store 造成循環依賴
// store(auth) -> services(userApi) -> httpClient -> interceptors -> store(auth)
// store(auth) -> services(authApi/menuApi) -> httpClient -> interceptors -> store(auth)
// - Response:統一處理 HTTP 錯誤(目前示範 401/403/500
// - 使用 normalizeError 將錯誤轉成 ApiRequestError
//