代码调整
This commit is contained in:
parent
22534c623a
commit
9511d7807c
@ -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<User> {
|
||||
export async function register(info: RegisterInfo): Promise<string> {
|
||||
const response = await api.post(`${UserUriBase}/register`, {
|
||||
...info,
|
||||
password: encryptPassword(info.password),
|
||||
});
|
||||
return response.data as User;
|
||||
return response.data;
|
||||
}
|
||||
|
||||
interface LoginInfo {
|
||||
|
Loading…
Reference in New Issue
Block a user