From 1a8f39e83dd72e1a672f83e151c149d15679c3eb Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 04 十二月 2023 16:43:18 +0800
Subject: [PATCH] 'bug修复'

---
 Monitor/MonitorDlg.cpp |   43 ++++++++++++++++++++++++++++---------------
 1 files changed, 28 insertions(+), 15 deletions(-)

diff --git a/Monitor/MonitorDlg.cpp b/Monitor/MonitorDlg.cpp
index de77c2e..1a68f5e 100644
--- a/Monitor/MonitorDlg.cpp
+++ b/Monitor/MonitorDlg.cpp
@@ -345,22 +345,35 @@
 			CString st = L"";
 			auto doc = JsonUtil::parseUTF16(result);
 			if (doc.IsObject()) {
-				if (doc[L"code"] == 0&& doc[L"data"].IsArray()) {
+				if (doc[L"code"] == 0&& doc[L"data"].IsObject()) {
 				
-						auto array = doc[L"data"].GetArray();
-						for (int i = 0; i < array.Size(); i++) {
-							st.Append(std::to_wstring(i + 1).c_str());
-							st.Append(L"-");
-							if (array[i][1].GetBool()) {
-								st.Append(L"宸查攣");
-							}
-							else {
-								st.Append(L"鏈攣");
-							}
-							st.Append(L"(");
-							st.Append(array[i][2].GetString());
-							st.Append(L")");
-							st.Append(L"  ");
+						auto data = doc[L"data"].GetObject();
+						if (data.HasMember(L"common")) {
+							st.Append(L"涓�鑸�氶亾锛�");
+							st.Append(L"鎬绘暟-");
+							st.Append(std::to_wstring( data[L"common"][0].GetInt()).c_str());
+							st.Append(L" ");
+							st.Append(L"鍙敤鏁�-");
+							st.Append(std::to_wstring(data[L"common"][1].GetInt()).c_str());
+							st.Append(L" ");
+							st.Append(L"娲昏穬鏁�-");
+							st.Append(std::to_wstring(data[L"common"][2].GetInt()).c_str());
+							st.Append(L" ");
+							st.Append(L"\r\n");
+						}
+
+						if (data.HasMember(L"trade")) {
+							st.Append(L"浜ゆ槗閫氶亾锛�");
+							st.Append(L"鎬绘暟-");
+							st.Append(std::to_wstring(data[L"trade"][0].GetInt()).c_str());
+							st.Append(L" ");
+							st.Append(L"鍙敤鏁�-");
+							st.Append(std::to_wstring(data[L"trade"][1].GetInt()).c_str());
+							st.Append(L" ");
+							st.Append(L"娲昏穬鏁�-");
+							st.Append(std::to_wstring(data[L"trade"][2].GetInt()).c_str());
+							st.Append(L" ");
+							st.Append(L"\r\n");
 						}
 					}
 					dlg->labelHXTradeChannel.SetWindowTextW(st);

--
Gitblit v1.8.0