Ver código fonte

git-svn-id: https://202.107.226.68:8443/svn/Services/ResistanceMonitor@89 a05970a1-87b9-9d4f-9ee5-fa77e2ec115b

shenchunzhong 1 ano atrás
pai
commit
2ab9e80c0f
1 arquivos alterados com 4 adições e 2 exclusões
  1. 4 2
      4.Data/HttpPrcess.cpp

+ 4 - 2
4.Data/HttpPrcess.cpp

@@ -4730,7 +4730,7 @@ int DealResistMove(const httplib::Request& req, const string token, char** json,
             ASSERT(ii != mapSecondStatInfo2.end());
 			last_value = ii->second.end_val;
 			auto dif = last_value - first_value;
-			auto strLog = fmt::format("{}  first:{}  last:{} dif:{}",
+			auto strLog = fmt::format("[ÖØÐÂʶ±ðĦ²ÁÁ¦] {}  first:{}  last:{} dif:{}",
 				CTime(it->time / 1000).Format("%Y-%m-%d %H:%M:%S"), first_value, last_value, dif);
 			if (dif > 1000 || dif < -1000)
 			{
@@ -4885,9 +4885,11 @@ int DealResistMove(const httplib::Request& req, const string token, char** json,
 			yyjson_mut_arr_add_int(doc, coord, show_time);
 			yyjson_mut_arr_add_int(doc, coord, curr_val);
 			yyjson_mut_obj_add_strcpy(doc, obj, "time", fmt::format("{}.{:0>3}", CTime(show_time/1000).Format("%Y-%m-%d %H:%M:%S"), show_time % 1000).c_str());
+			yyjson_mut_obj_add_str(doc, obj, "color", "#802A2A");
+			if (show_val < 0)
+				show_val = -show_val;
 			yyjson_mut_obj_add_int(doc, obj, "val", show_val);
 			yyjson_mut_obj_add_strcpy(doc, obj, "label", ANSItoUTF8(fmt::format("ÎÈֵ̬:{}", show_val)).c_str());
-			yyjson_mut_obj_add_str(doc, obj, "color", "#802A2A");
 			if (it.bUpOrDown == eUpOrDownInfo::UOD_DOWN)
 				yyjson_mut_obj_add_str(doc, obj, "position", "bottom");
 		}