feat: initialize app with routing, query management, and UI framework

- Replace Vite boilerplate with React Router for page navigation
- Add React Query for server state and cache management
- Integrate shadcn/ui component library with Tailwind CSS v4
- Configure @/ path alias for clean module imports
- Set up Vite dev proxy to API backend
- Remove default App.css, App.tsx, and react.svg assets
This commit is contained in:
2026-05-24 19:19:08 +08:00
parent 072f959949
commit 60e83d49dd
37 changed files with 6288 additions and 214 deletions
+22
View File
@@ -0,0 +1,22 @@
import client from "./client"
import type { ApiResultListMyBorrowVo, ApiResultMyBorrowVo, ApiResultString } from "@/types/api"
export function getAllMyBorrows() {
return client.get<ApiResultListMyBorrowVo>("/api/borrows/getall")
}
export function getOneMyBorrow(borrowId: number) {
return client.get<ApiResultMyBorrowVo>("/api/borrows/getone", { params: { borrowId } })
}
export function searchMyBorrows(query: string) {
return client.get<ApiResultListMyBorrowVo>("/api/borrows/search", { params: { query } })
}
export function borrowBookForMe(bookId: number) {
return client.post<ApiResultString>("/api/borrows/borrowbook", null, { params: { bookId } })
}
export function returnBookForMe(borrowId: number) {
return client.post<ApiResultString>("/api/borrows/returnbook", null, { params: { borrowId } })
}