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:
@@ -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
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user