- 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
17 lines
339 B
TypeScript
17 lines
339 B
TypeScript
// 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; |