修复切换<视频智能分析>与<蚕茧仪评分析>Tab页后其他页面无法正常加载的问题

This commit is contained in:
BBIT-Kai
2025-08-22 09:57:27 +08:00
parent cdce90bb27
commit 10ca219970
7 changed files with 335 additions and 229 deletions
+22
View File
@@ -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
*/