| | |
| | | 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); |