Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FmTakeaway
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shangshang.dai
FmTakeaway
Commits
30d909a2
Commit
30d909a2
authored
May 11, 2017
by
ss.dai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
29ebf744
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
fmTakeaway/Control/refundControl.cpp
+3
-3
No files found.
fmTakeaway/Control/refundControl.cpp
View file @
30d909a2
...
@@ -62,9 +62,9 @@ void RefundControl::run()
...
@@ -62,9 +62,9 @@ void RefundControl::run()
continue
;
continue
;
}
}
recvData
=
m_tcpSocket
->
readAll
();
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
::
from
Utf8
(
recvData
).
toUtf8
(),
&
jsonError
);
jsonDoc
=
QJsonDocument
::
fromJson
(
QString
::
from
Local8Bit
(
recvData
).
toUtf8
(),
&
jsonError
);
if
(
jsonError
.
error
==
QJsonParseError
::
NoError
)
if
(
jsonError
.
error
==
QJsonParseError
::
NoError
)
{
{
QJsonObject
jsonObject
=
jsonDoc
.
object
();
QJsonObject
jsonObject
=
jsonDoc
.
object
();
...
@@ -120,7 +120,7 @@ void RefundControl::run()
...
@@ -120,7 +120,7 @@ void RefundControl::run()
// 发生错误
// 发生错误
replyData
=
QString
(
"{
\"
ver
\"
:1,
\"
order_id
\"
:
\"
%1
\"
,
\"
statusCode
\"
:101,
\"
msg
\"
:
\"
%2
\"
}"
).
arg
(
orderId
).
arg
(
error
);
replyData
=
QString
(
"{
\"
ver
\"
:1,
\"
order_id
\"
:
\"
%1
\"
,
\"
statusCode
\"
:101,
\"
msg
\"
:
\"
%2
\"
}"
).
arg
(
orderId
).
arg
(
error
);
m_tcpSocket
->
write
(
replyData
.
to
Utf8
());
m_tcpSocket
->
write
(
replyData
.
to
Local8Bit
());
m_tcpSocket
->
waitForBytesWritten
(
5000
);
m_tcpSocket
->
waitForBytesWritten
(
5000
);
m_tcpSocket
->
close
();
m_tcpSocket
->
close
();
continue
;
continue
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment