From ccd3040a67f47d70d84b1cc0f3f8c034c87f5729 Mon Sep 17 00:00:00 2001 From: gaozheng Date: Thu, 25 Jun 2026 10:30:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(login):=20login2=20=E8=A1=A5=20checkCode=3D?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=BE=93=E5=85=A5=E9=AA=8C=E8=AF=81=E7=A0=81?= =?UTF-8?q?=20+=20codeId(=E4=BF=AE=20checkCodeNotNull)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/net/AuthService.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/net/AuthService.cpp b/src/net/AuthService.cpp index 734836b..998f2cf 100644 --- a/src/net/AuthService.cpp +++ b/src/net/AuthService.cpp @@ -41,12 +41,13 @@ LoginLoad* AuthService::loginAsync(const QString& username, const QString& passw }; // step2:RSA 加密密码(PKCS#1 v1.5 -> base64,可抛 std::exception → ApiChain 转 failed)-> login2。 - ApiChain::StepFactory step2 = [this, username, password](const QList&) -> IApiCall* { + ApiChain::StepFactory step2 = [this, username, password, code, codeId](const QList&) -> IApiCall* { RsaEncryptor enc(rsaPublicKeyPem_); const std::string encrypted = enc.encryptBase64(password.toStdString()); const QJsonObject body{{QStringLiteral("username"), username}, {QStringLiteral("password"), QString::fromStdString(encrypted)}, - {QStringLiteral("checkCode"), QString()}}; + {QStringLiteral("checkCode"), code}, // 用户输入的验证码(后端 checkCodeNotNull) + {QStringLiteral("codeId"), codeId}}; return api_.postJsonAsync(QString::fromLatin1(kPathLogin), body); };