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:
17
src/apis/config.ts
Normal file
17
src/apis/config.ts
Normal 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;
|
||||
Reference in New Issue
Block a user