实现权限列表与权限渲染组件

This commit is contained in:
2026-03-31 10:56:01 +08:00
parent 2c7970796f
commit 12b60e74df
7 changed files with 94 additions and 3 deletions

View File

@@ -16,7 +16,7 @@ export async function login(params: {
username: string
password: string
remember: boolean
}): Promise<ApiResponse> {
}): Promise<ApiResponse<string[]>> {
const resp = await callByDevice<TokenResp>("/api/auth/token", {
grant_type: "password",
login_type: "password",
@@ -43,7 +43,7 @@ export async function login(params: {
return {
success: true,
data: undefined,
data: data.scope?.split(" ") || [],
}
}