You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
588 B
20 lines
588 B
import type { GenerateQrCodeResult, QrCodeUserInfoResult } from "#/account/qrcode";
|
|
|
|
import requestClient from "@/api/request";
|
|
|
|
/**
|
|
* 生成登录二维码
|
|
* @returns 二维码信息
|
|
*/
|
|
export function generateApi(): Promise<GenerateQrCodeResult> {
|
|
return requestClient.post<GenerateQrCodeResult>("/api/account/qrcode/generate");
|
|
}
|
|
|
|
/**
|
|
* 检查二维码状态
|
|
* @param key 二维码Key
|
|
* @returns 二维码信息
|
|
*/
|
|
export function checkCodeApi(key: string): Promise<QrCodeUserInfoResult> {
|
|
return requestClient.get<QrCodeUserInfoResult>(`/api/account/qrcode/${key}/check`);
|
|
}
|
|
|