Commit 30d909a2 by ss.dai

1

parent 29ebf744
......@@ -62,9 +62,9 @@ void RefundControl::run()
continue;
}
recvData = m_tcpSocket->readAll();
QLOG_INFO() << QString("recv data.[%1]").arg(QString(recvData));
QLOG_INFO() << QString("recv data.[%1]").arg(QString::fromLocal8Bit(recvData));
jsonDoc = QJsonDocument::fromJson(QString::fromUtf8(recvData).toUtf8(), &jsonError);
jsonDoc = QJsonDocument::fromJson(QString::fromLocal8Bit(recvData).toUtf8(), &jsonError);
if(jsonError.error == QJsonParseError::NoError)
{
QJsonObject jsonObject = jsonDoc.object();
......@@ -120,7 +120,7 @@ void RefundControl::run()
// 发生错误
replyData = QString("{\"ver\":1, \"order_id\":\"%1\", \"statusCode\":101, \"msg\":\"%2\"}").arg(orderId).arg(error);
m_tcpSocket->write(replyData.toUtf8());
m_tcpSocket->write(replyData.toLocal8Bit());
m_tcpSocket->waitForBytesWritten(5000);
m_tcpSocket->close();
continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment