修复切换<视频智能分析>与<蚕茧仪评分析>Tab页后其他页面无法正常加载的问题
This commit is contained in:
@@ -8,6 +8,12 @@ export namespace AuthApi {
|
||||
account?: string;
|
||||
password?: string;
|
||||
}
|
||||
/** 注册 */
|
||||
export interface RegisterParams {
|
||||
account?: string;
|
||||
code?: string;
|
||||
password?: string;
|
||||
}
|
||||
|
||||
export interface Token {
|
||||
token: string;
|
||||
@@ -39,6 +45,22 @@ export async function loginApi(data: AuthApi.LoginParams) {
|
||||
return requestClient.post<AuthApi.LoginResult>('/user/login', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送验证码
|
||||
*/
|
||||
export async function sendCodeApi(str: string) {
|
||||
return requestClient.post<any>('/user/sendCode', { str });
|
||||
}
|
||||
|
||||
/**
|
||||
* 注册
|
||||
*/
|
||||
export async function registerApi(data: AuthApi.RegisterParams) {
|
||||
// 密码加密
|
||||
data.password = sha256(data.password?.toString() || '');
|
||||
return requestClient.post<any>('/user/register', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新accessToken
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user