This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/doric/plugin/DoricNetworkPlugin.cpp
2021-05-20 18:27:45 +08:00

19 lines
733 B
C++

#include "DoricNetworkPlugin.h"
#include "utils/DoricNetworkService.h"
#include <QCoreApplication>
#include <QJsonDocument>
#include <QJsonObject>
void DoricNetworkPlugin::request(QString jsValueString, QString callbackId) {
QJsonDocument document = QJsonDocument::fromJson(jsValueString.toUtf8());
QJsonValue jsValue = document.object();
DoricNetworkService::getInstance()->request(jsValue, qApp,
[](int code, QByteArray data) {
qDebug() << code;
qDebug() << data;
qDebug() << "";
});
}