From 50ad482974a7e838d11360a84e9e8ff3f7974ab2 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期六, 12 十月 2024 09:34:01 +0800
Subject: [PATCH] 金茂问题修复

---
 HDL-ON_iOS/Info.plist                                          |    4 +-
 HDL_ON/Common/HDLCommon.cs                                     |    6 ++
 HDL_ON/DAL/Server/HttpUtil.cs                                  |    1 
 HDL_ON/Common/ApiUtlis.cs                                      |    2 
 HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs           |   55 +++++++++++++--------------
 HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs    |    2 
 HDL_ON/DAL/Mqtt/MqttClient.cs                                  |    2 -
 HDL_ON/UI/UI1-Login/LoginPage.cs                               |    6 +-
 HDL_ON/UI/UI2/FuntionControlView/Acst/WaterHeaterJinmaoPage.cs |    4 +-
 9 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist
index d34ffc9..5eb45c0 100644
--- a/HDL-ON_iOS/Info.plist
+++ b/HDL-ON_iOS/Info.plist
@@ -11,7 +11,7 @@
 	<key>CFBundleName</key>
 	<string>On Pro</string>
 	<key>CFBundleShortVersionString</key>
-	<string>2.7.0</string>
+	<string>2.7.1</string>
 	<key>CFBundleURLTypes</key>
 	<array>
 		<dict>
@@ -36,7 +36,7 @@
 		</dict>
 	</array>
 	<key>CFBundleVersion</key>
-	<string>2.7.0</string>
+	<string>2.7.1</string>
 	<key>LSApplicationQueriesSchemes</key>
 	<array>
 		<string>weixinULAPI</string>
diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs
index 3338b19..b0e5f6d 100644
--- a/HDL_ON/Common/ApiUtlis.cs
+++ b/HDL_ON/Common/ApiUtlis.cs
@@ -721,7 +721,7 @@
                             //鎼滅储缃戝叧
                             DriverLayer.Control.Ins.SearchLoaclGateway();
                             //閲嶆柊杩炴帴mqtt
-                            DAL.Mqtt.MqttClient.DisConnectRemote("鍒锋柊鏁版嵁锛岄噸杩瀖qtt", false);
+                            //DAL.Mqtt.MqttClient.DisConnectRemote("鍒锋柊鏁版嵁锛岄噸杩瀖qtt", false);
                             #endregion
                         }
                         catch (Exception ex){
diff --git a/HDL_ON/Common/HDLCommon.cs b/HDL_ON/Common/HDLCommon.cs
index 8b23ca2..ce6a03e 100644
--- a/HDL_ON/Common/HDLCommon.cs
+++ b/HDL_ON/Common/HDLCommon.cs
@@ -247,6 +247,10 @@
         {
             try
             {
+                if (OnAppConfig.Instance.LastLoginUserId == "")
+                {
+                    return;
+                }
                 //MainPage.Log($"鎺ユ敹鍒版帹閫侊紝锛岋紝锛�.{Newtonsoft.Json.JsonConvert.SerializeObject(jpushMessageInfo).ToString()}");
                 //Extras涓虹┖涓嶅鐞�
                 if (string.IsNullOrEmpty(jpushMessageInfo.Extras)) return;
@@ -575,7 +579,7 @@
                 Logout();
             }catch (Exception ex)
             {
-                MainPage.Log($"鎸や笅绾垮紓甯�:{ex.Message}");
+                MainPage.Log("Error",$"鎸や笅绾垮紓甯�:{ex.Message}");
             }
         }
 
diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index 9593aef..429c0a7 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -128,8 +128,6 @@
             InitMqtt();
         }
 
-        public static bool IsInitMqtt = false;
-
         static void InitMqtt()
         {
             new System.Threading.Thread(async () => {
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 5882515..a74c247 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -174,6 +174,7 @@
                     urlHead = OnAppConfig.Instance.RequestHttpsHost;
                 }
                 string requestFullUrl = urlHead + apiPath;
+                //string requestFullUrl = "https://gateway-hotel-test.hdlcontrol.com" + apiPath;
 
 
                 RestClient client = new RestClient(requestFullUrl);
diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index 653ae3e..2c67059 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -318,7 +318,7 @@
                     etAccount.Text = "18475593023";//Online
                     //etAccount.Text = "13960905167";
                     //etAccount.Text = "iot-en-public@hdlchina.com.cn";
-                    etAccount.Text = "13912920288";
+                    etAccount.Text = "13160677992";
                 }
                 else
                 {
@@ -366,8 +366,8 @@
                 {
                     etPassword.Text = "a123456";
                 }
-                else if (etAccount.Text == "iot-en-public@hdlchina.com.cn") {
-                    etPassword.Text = "a123456";
+                else if (etAccount.Text == "13160677992") {
+                    etPassword.Text = "123456aa";
                 }
 
                 btnLogin.IsSelected = true;
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs
index deace59..12876b2 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs
@@ -13,10 +13,13 @@
 
         Button btnTempValues;
         Button btnHumiValues;
+        Button btnTempValuesUint;
+        Button btnHumiValuesUint;
 
         Button btnSetTempValues;
         DiyImageSeekBar tempBar;
         Button btnPowerControl;
+        Button btnSetTempUnit;
 
         Function function;
 
@@ -34,7 +37,8 @@
             Application.RunOnMainThread(() => {
                 bodyView.btnTempValues.Text = temp.GetAttrState(AcstSub_AttrEnum.room_temp.ToString());
                 bodyView.btnHumiValues.Text = temp.GetAttrState(AcstSub_AttrEnum.room_humidity.ToString());
-
+                bodyView.btnHumiValuesUint.X = (bodyView.btnHumiValues.GetTextWidth() + bodyView.btnHumiValues.Width) / 2;
+                bodyView.btnTempValuesUint.X = (bodyView.btnTempValues.GetTextWidth() + bodyView.btnTempValues.Width) / 2;
 
                 int setTempValue = 0;
                 double dd = 0;
@@ -43,7 +47,8 @@
                 if (setTempValue != 0)
                     bodyView.btnSetTempValues.Text = setTempValue.ToString();
 
-                //bodyView.btnSetTempValues.Width = bodyView.btnSetTempValues.GetTextWidth() + Application.GetRealWidth(10);
+                bodyView.btnSetTempValues.Width = bodyView.btnSetTempValues.GetTextWidth() + Application.GetRealWidth(10);
+                bodyView.btnSetTempUnit.X = bodyView.btnSetTempValues.Right;
 
                 //int progress = 0;
                 //int.TryParse(temp.GetAttrState(AcstSub_AttrEnum.set_temp.ToString()), out progress);
@@ -87,6 +92,7 @@
                     break;
             }
             bodyView = this;
+            BackgroundColor = CSS_Color.BackgroundColor;
         }
 
         public void LoadPage(Action action)
@@ -131,19 +137,16 @@
                 IsBold = true,
                 TextSize = 30,
                 TextColor = CSS.CSS_Color.FirstLevelTitleColor,
-                TextAlignment = TextAlignment.TopRight,
+                TextAlignment = TextAlignment.TopCenter,
                 Text = function.GetAttrState(AcstSub_AttrEnum.room_temp.ToString(),"---"),
+                Width = Application.GetRealWidth(130),
             };
-#if __IOS__
-            btnTempValues.Width = btnTempValues.GetTextWidth() + Application.GetRealWidth(10);
-#else
-            btnTempValues.Width = btnTempValues.GetTextWidth();
-#endif
             btnTempValues.Gravity = Gravity.CenterHorizontal;
             tempValuesView.AddChidren(btnTempValues);
-            var btnTempValuesUint = new Button()
+            
+            btnTempValuesUint = new Button()
             {
-                X = btnTempValues.Right,
+                X = (btnTempValues.GetTextWidth() + btnTempValues.Width) / 2,
                 //Y = Application.GetRealWidth(48),
                 Y = Application.GetRealWidth(45),
                 Height = Application.GetRealWidth(66),
@@ -172,19 +175,14 @@
                 TextSize = 30,
                 TextColor = CSS.CSS_Color.FirstLevelTitleColor,
                 Text = function.GetAttrState(AcstSub_AttrEnum.room_humidity.ToString(),"---"),
-                TextAlignment = TextAlignment.TopRight,
+                TextAlignment = TextAlignment.TopCenter,
+                Width = Application.GetRealWidth(130),
             };
-
-#if __IOS__
-            btnHumiValues.Width = btnTempValues.GetTextWidth() + Application.GetRealWidth(10);
-#else
-            btnHumiValues.Width = btnTempValues.GetTextWidth();
-#endif
             btnHumiValues.Gravity = Gravity.CenterHorizontal;
             humiValuesView.AddChidren(btnHumiValues);
-            var btnHumiValuesUint = new Button()
+            btnHumiValuesUint = new Button()
             {
-                X = btnTempValues.Right,
+                X = (btnHumiValues.GetTextWidth() + btnHumiValues.Width) / 2,
                 Y = Application.GetRealWidth(45),
                 TextAlignment = TextAlignment.TopLeft,
                 Width = Application.GetRealWidth(30),
@@ -230,13 +228,12 @@
             };
             contentView.AddChidren(btnSetTempValues);
 #if __IOS__
-            bodyView.btnSetTempValues.Width = bodyView.btnSetTempValues.GetTextWidth() + Application.GetRealWidth(10);
+            btnSetTempValues.Width = btnSetTempValues.GetTextWidth() + Application.GetRealWidth(10);
 #else
-            bodyView.btnSetTempValues.Width = bodyView.btnSetTempValues.GetTextWidth() + Application.GetRealWidth(5);
+            btnSetTempValues.Width = btnSetTempValues.GetTextWidth() + Application.GetRealWidth(5);
 #endif
 
-
-            var btnSetTempUnit = new Button()
+            btnSetTempUnit = new Button()
             {
                 X = btnSetTempValues.Right + Application.GetRealWidth(3),
                 Y = Application.GetRealHeight(267),
@@ -248,8 +245,6 @@
                 TextAlignment = TextAlignment.TopLeft,
             };
             contentView.AddChidren(btnSetTempUnit);
-
-
 
             var btnMinValuesText = new Button()
             {
@@ -263,10 +258,6 @@
                 TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
             };
             contentView.AddChidren(btnMinValuesText);
-
-
-            //int progress = 0;
-            //int.TryParse(function.GetAttrState(FunctionAttributeKey.SetTemp),out progress);
 
             tempBar = new DiyImageSeekBar()
             {
@@ -290,6 +281,12 @@
             contentView.AddChidren(tempBar);
             tempBar.OnProgressChangedEvent = (sender, e) => {
                 btnSetTempValues.Text = (e + 16).ToString();
+#if __IOS__
+                btnSetTempValues.Width = btnSetTempValues.GetTextWidth() + Application.GetRealWidth(10);
+#else
+            btnSetTempValues.Width = btnSetTempValues.GetTextWidth() + Application.GetRealWidth(5);
+#endif
+                btnSetTempUnit.X = btnSetTempValues.Right;
             };
             tempBar.OnStopTrackingTouchEvent = (sender, e) => {
                 new System.Threading.Thread(() => {
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs
index 02bbf02..c4da2d5 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs
@@ -996,7 +996,7 @@
                     Y = Application.GetRealWidth(76),
                     Height = Application.GetRealWidth(17),
                     TextAlignment = TextAlignment.Center,
-                    Text = "瀹炴椂鏀剧數鍔熺巼(kwh)",
+                    Text = "瀹炴椂鏀剧數鍔熺巼(kw)",
                     TextColor = CSS_Color.TextualColor,
                     TextSize = 12,
                 };
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Acst/WaterHeaterJinmaoPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Acst/WaterHeaterJinmaoPage.cs
index fe07f72..306332d 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Acst/WaterHeaterJinmaoPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Acst/WaterHeaterJinmaoPage.cs
@@ -673,7 +673,7 @@
                     TextAlignment = TextAlignment.CenterRight,
                     TextSize = 14,
                     TextColor = CSS_Color.FirstLevelTitleColor,
-                    Text = (volume - recyclVolume) + "t"
+                    Text = Math.Round((volume - recyclVolume),1) + "t"
                 };
                 flowView.AddChidren(flow_ElectricDriveValuesButton);
 
@@ -1282,7 +1282,7 @@
             {
                 flow_ElectricDriveProgressButton.Text = ((int)(100 - recyclVolumePercent)) + "%";
             }
-            flow_ElectricDriveValuesButton.Text = (((int)(volume * 100) - (int)(recyclVolume * 100)) / 100.0) + "t";
+            flow_ElectricDriveValuesButton.Text = Math.Round((volume - recyclVolume), 1) + "t";//(((int)(volume * 100) - (int)(recyclVolume * 100)) / 100.0) + "t";
         }
 
         /// <summary>

--
Gitblit v1.8.0