feat/vtk-3d-view #7

Merged
gaozheng merged 301 commits from feat/vtk-3d-view into main 2026-06-27 18:43:52 +08:00
1 changed files with 3 additions and 2 deletions
Showing only changes of commit ccd3040a67 - Show all commits

View File

@ -41,12 +41,13 @@ LoginLoad* AuthService::loginAsync(const QString& username, const QString& passw
};
// step2RSA 加密密码PKCS#1 v1.5 -> base64可抛 std::exception → ApiChain 转 failed-> login2。
ApiChain::StepFactory step2 = [this, username, password](const QList<ApiResponse>&) -> IApiCall* {
ApiChain::StepFactory step2 = [this, username, password, code, codeId](const QList<ApiResponse>&) -> 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);
};