|
@@ -35,7 +35,6 @@ const QrCodeModal: React.FC<QrCodeModalProps> = ({
|
|
|
const [loading, setLoading] = useState(false);
|
|
|
const [qrCodeData, setQrCodeData] = useState<QrCodeData | null>(null);
|
|
|
const [countdown, setCountdown] = useState<number>(0);
|
|
|
- const [loginStatus, setLoginStatus] = useState<number>(0); // 登录状态
|
|
|
const [loginMessage, setLoginMessage] = useState<string>(""); // 登录状态描述
|
|
|
const [verifyModalVisible, setVerifyModalVisible] = useState(false); // 验证码输入弹窗
|
|
|
const [verifyCode, setVerifyCode] = useState(""); // 验证码
|
|
@@ -49,7 +48,6 @@ const QrCodeModal: React.FC<QrCodeModalProps> = ({
|
|
|
try {
|
|
|
setLoading(true);
|
|
|
// 重置登录状态
|
|
|
- setLoginStatus(0);
|
|
|
setLoginMessage("");
|
|
|
setVerifyCode("");
|
|
|
|
|
@@ -91,7 +89,6 @@ const QrCodeModal: React.FC<QrCodeModalProps> = ({
|
|
|
const res = await http.post<LoginStatusData>(qwCheckLogin, { uuid });
|
|
|
if (res.success) {
|
|
|
const { loginStatus, message: loginMsg } = res.data;
|
|
|
- setLoginStatus(loginStatus);
|
|
|
setLoginMessage(loginMsg || "");
|
|
|
|
|
|
// 只有登录成功时停止轮询
|
|
@@ -146,8 +143,6 @@ const QrCodeModal: React.FC<QrCodeModalProps> = ({
|
|
|
setVerifyModalVisible(false);
|
|
|
// 重置验证码
|
|
|
setVerifyCode("");
|
|
|
- // 重置登录状态,继续轮询
|
|
|
- setLoginStatus(0);
|
|
|
} else {
|
|
|
message.error(res.msg || "验证失败");
|
|
|
}
|
|
@@ -194,7 +189,6 @@ const QrCodeModal: React.FC<QrCodeModalProps> = ({
|
|
|
// 关闭弹窗时清空数据和定时器
|
|
|
setQrCodeData(null);
|
|
|
setCountdown(0);
|
|
|
- setLoginStatus(0);
|
|
|
setLoginMessage("");
|
|
|
setVerifyModalVisible(false);
|
|
|
setVerifyCode("");
|