diff --git a/src/api/UserApi.ts b/src/api/UserApi.ts index 342af04..e87d6b8 100644 --- a/src/api/UserApi.ts +++ b/src/api/UserApi.ts @@ -15,7 +15,7 @@ export interface User { name: string; mobile: string; password: string; - registerTime: string; + register_time: string; } const PasswordSult = '4a6d74126bfd06d69406fcccb7e7d5d9'; // 密码加盐 @@ -29,12 +29,12 @@ function encryptPassword(password: string): string { * @param info * @returns */ -export async function register(info: RegisterInfo): Promise { +export async function register(info: RegisterInfo): Promise { const response = await api.post(`${UserUriBase}/register`, { ...info, password: encryptPassword(info.password), }); - return response.data as User; + return response.data; } interface LoginInfo {