feat: use api for manage people

- wrap the backend apis
- post people by api
- list people by api
- auto fill people form by post input api
- auto fill people form by post image api
This commit is contained in:
2025-10-25 15:50:29 +08:00
parent ddb04ff15e
commit 28de10061a
12 changed files with 968 additions and 50 deletions

17
src/apis/config.ts Normal file
View File

@@ -0,0 +1,17 @@
// API 配置
export const API_CONFIG = {
BASE_URL: 'http://127.0.0.1:8099',
TIMEOUT: 10000,
HEADERS: {
'Content-Type': 'application/json',
},
};
// API 端点
export const API_ENDPOINTS = {
INPUT: '/input',
INPUT_IMAGE: '/input_image',
PEOPLES: '/peoples',
PEOPLE_BY_ID: (id: string) => `/peoples/${id}`,
} as const;