feat(web-admin): add wx-qr create and status API clients.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
98e31c88b2
commit
c5a0e17a05
4 files changed
+124
No files matched your search
@@ -29,6 +29,45 @@ export async function fetchLogin(params: { username: string; password: string })
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchWxQrCreate() {
|
||||
return request.post<{
|
||||
sessionId: string
|
||||
expiresIn: number
|
||||
qrImageBase64: string
|
||||
}>({
|
||||
url: '/web/auth/wx-qr/create',
|
||||
data: {},
|
||||
headers: { 'X-Api-Crypto': 'off' },
|
||||
showErrorMessage: true
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchWxQrStatus(sessionId: string) {
|
||||
return request.get<{
|
||||
status: string
|
||||
message?: string
|
||||
token?: string
|
||||
refreshToken?: string
|
||||
expiresIn?: number
|
||||
userInfo?: {
|
||||
id: string
|
||||
username: string
|
||||
realName: string
|
||||
phone: string
|
||||
role: string
|
||||
roles?: string[]
|
||||
regionId: string
|
||||
regionName: string
|
||||
avatarUrl?: string | null
|
||||
}
|
||||
}>({
|
||||
url: '/web/auth/wx-qr/status',
|
||||
params: { sessionId },
|
||||
headers: { 'X-Api-Crypto': 'off' },
|
||||
showErrorMessage: false
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前用户信息
|
||||
* @returns 用户信息
|
||||
|
||||
Reference in new issue
Block a user