引入openspec管理

This commit is contained in:
2025-12-22 18:29:23 +08:00
parent 2454e6d23a
commit b765a5d4ed
27 changed files with 1058 additions and 1814 deletions

View File

@@ -59,13 +59,13 @@ api.interceptors.response.use(
export const userAPI = {
createUser: (data: { name: string; phone: string; password?: string }) => api.post('/users', data),
getUser: (id: string) => api.get(`/users/${id}`),
validateUserInfo: (data: { name: string; phone: string }) => api.post('/users/validate', data),
validateUserInfo: (data: { name: string; phone: string; password?: string }) => api.post('/users/validate', data),
getUsersByName: (name: string) => api.get(`/users/name/${name}`),
};
// 题目相关API
export const questionAPI = {
getQuestions: (params?: { type?: string; page?: number; limit?: number }) =>
getQuestions: (params?: { type?: string; category?: string; keyword?: string; startDate?: string; endDate?: string; page?: number; limit?: number }) =>
api.get('/questions', { params }),
getQuestion: (id: string) => api.get(`/questions/${id}`),
createQuestion: (data: any) => api.post('/questions', data),