代码调整
This commit is contained in:
parent
22534c623a
commit
9511d7807c
@ -15,7 +15,7 @@ export interface User {
|
|||||||
name: string;
|
name: string;
|
||||||
mobile: string;
|
mobile: string;
|
||||||
password: string;
|
password: string;
|
||||||
registerTime: string;
|
register_time: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const PasswordSult = '4a6d74126bfd06d69406fcccb7e7d5d9'; // 密码加盐
|
const PasswordSult = '4a6d74126bfd06d69406fcccb7e7d5d9'; // 密码加盐
|
||||||
@ -29,12 +29,12 @@ function encryptPassword(password: string): string {
|
|||||||
* @param info
|
* @param info
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export async function register(info: RegisterInfo): Promise<User> {
|
export async function register(info: RegisterInfo): Promise<string> {
|
||||||
const response = await api.post(`${UserUriBase}/register`, {
|
const response = await api.post(`${UserUriBase}/register`, {
|
||||||
...info,
|
...info,
|
||||||
password: encryptPassword(info.password),
|
password: encryptPassword(info.password),
|
||||||
});
|
});
|
||||||
return response.data as User;
|
return response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface LoginInfo {
|
interface LoginInfo {
|
||||||
|
Loading…
Reference in New Issue
Block a user