chore: cleanup old frontend code and update project configs

This commit removes the deprecated frontend/web-old directory, updates various project configuration files including tsconfig, vite config, environment variables, and backend data models. It also fixes several API paths, adds tenant awareness to multiple models, and makes minor UI adjustments.
This commit is contained in:
zhangtao
2026-05-27 01:12:03 +08:00
parent eb18d85327
commit 53d2a9d13e
581 changed files with 14751 additions and 55305 deletions
@@ -70,6 +70,23 @@ const AuthAPI = {
params: { token },
});
},
/** 获取当前用户的可选租户列表 */
getTenants() {
return request<ApiResponse<TenantOption[]>>({
url: `${API_PATH}/tenants`,
method: "get",
});
},
/** 选择租户,返回含 tenant_id 的新 JWT */
selectTenant(tenantId: number) {
return request<ApiResponse<SelectTenantResult>>({
url: `${API_PATH}/select-tenant`,
method: "post",
data: { tenant_id: tenantId },
});
},
};
export default AuthAPI;
@@ -95,6 +112,31 @@ export interface LoginResult {
refresh_token: string;
token_type: string;
expires_in: number;
tenants?: TenantOption[];
user_info?: UserInfoBrief;
}
/** 租户选项 */
export interface TenantOption {
id: number;
name: string;
code: string;
}
/** 用户简要信息 */
export interface UserInfoBrief {
id: number;
username: string;
name: string;
avatar?: string;
is_super_admin?: boolean;
}
/** 选择租户响应 */
export interface SelectTenantResult {
access_token: string;
token_type: string;
expires_in: number;
}
/** 验证码信息 */