|
@@ -8,19 +8,21 @@
|
|
|
#include "global.h"
|
|
|
#include "loadingwidget.h"
|
|
|
#include "logger.h"
|
|
|
+#include "loginwindow.h"
|
|
|
#include "registryManager/registrymanager.h"
|
|
|
#include "ui_blastopepage.h"
|
|
|
|
|
|
BlastOpePage::BlastOpePage(QWidget *parent)
|
|
|
: QWidget(parent), ui(new Ui::BlastOpePage), dao(DatabaseManager::getInstance().getDatabase()) {
|
|
|
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
|
|
- QString useFaceVerify = env.value("UseFaceVerify", "true");
|
|
|
- if (useFaceVerify.toLower() == "true") {
|
|
|
- InitFace();
|
|
|
- } else {
|
|
|
- ui->setupUi(this);
|
|
|
- initPagination();
|
|
|
- }
|
|
|
+ InitFace();
|
|
|
+ // QString useFaceVerify = env.value("UseFaceVerify", "true");
|
|
|
+ // if (useFaceVerify.toLower() == "true") {
|
|
|
+ // InitFace();
|
|
|
+ // } else {
|
|
|
+ // ui->setupUi(this);
|
|
|
+ // initPagination();
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
void BlastOpePage::showDownWidget(QString uuid, const QString &topic, const QString &message) {
|
|
@@ -48,6 +50,7 @@ void BlastOpePage::InitFace() {
|
|
|
LoadingWidget::showLoading(this, "请求创建人脸识别...");
|
|
|
|
|
|
layout = new QVBoxLayout(this);
|
|
|
+ // TODO: relase the qwebengineview when not successfully verified
|
|
|
view = new QWebEngineView(this);
|
|
|
view->setAttribute(Qt::WA_OpaquePaintEvent);
|
|
|
|
|
@@ -217,19 +220,21 @@ void BlastOpePage::handleFeaturePermission(QWebEnginePage *page, const QUrl &sec
|
|
|
|
|
|
QJsonObject BlastOpePage::getMetaInfo() {
|
|
|
QJsonObject metaInfo;
|
|
|
+ QString certName;
|
|
|
+ QString certNo;
|
|
|
|
|
|
// TODO: 获取登录用户信息
|
|
|
QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); // 获取系统环境变量
|
|
|
- if (env.contains("certName") && env.contains("certNo")) {
|
|
|
- qDebug() << "Environment variables 'certName' or 'certNo' not found.";
|
|
|
- return metaInfo; // 如果没有找到相关环境变量,返回空的 QJsonObject
|
|
|
- } /*else {
|
|
|
- certName = RegistryManager::getInstance().getCertName(env.value("certName", ""));
|
|
|
- certID = RegistryManager::getInstance().setCertNo(env.value("certNo", ""));
|
|
|
- }
|
|
|
- */
|
|
|
- QString certName = env.value("certName", ""); // 第二个参数为默认值
|
|
|
- QString certNo = env.value("certNo", "");
|
|
|
+ // if (env.contains("certName") && env.contains("certNo")) {
|
|
|
+ // certName = env.value("certName", ""); // 第二个参数为默认值
|
|
|
+ // certNo = env.value("certNo", "");
|
|
|
+ // qDebug() << "Environment variables 'certName' or 'certNo' not found.";
|
|
|
+ // return metaInfo; // 如果没有找到相关环境变量,返回空的 QJsonObject
|
|
|
+ // } else {
|
|
|
+ QMap<QString, QString> userInfo = RegistryManager::instance()->getCurentLoginUser();
|
|
|
+ certName = userInfo.value("certName", "");
|
|
|
+ certNo = userInfo.value("identity", "");
|
|
|
+ //}
|
|
|
metaInfo["certName"] = certName;
|
|
|
metaInfo["certNo"] = certNo;
|
|
|
qDebug() << certName << certNo << "<certInfo";
|