From 7e94d0d0dcb7eae298d0bbb4221c970037448c9f Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 02 十一月 2023 16:22:52 +0800 Subject: [PATCH] 修复首次登录mqtt无法订阅的问题 --- HDL-ON_iOS/ViewController.cs | 7 +++++++ HDL-ON_Android/Properties/AndroidManifest.xml | 2 +- HDL-ON_iOS/Info.plist | 4 ++-- HDL_ON/DAL/Server/HttpUtil.cs | 2 +- HDL-ON_Android/Resources/Resource.designer.cs | 2 +- HDL_ON/UI/MainPage.cs | 10 ++++------ HDL_ON/DAL/Mqtt/MqttClient.cs | 7 ++----- HDL_ON/UI/UI1-Login/LoginPage.cs | 2 +- 8 files changed, 19 insertions(+), 17 deletions(-) diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml index f522fe1..846f0be 100644 --- a/HDL-ON_Android/Properties/AndroidManifest.xml +++ b/HDL-ON_Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ 锘�<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.3.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202310301"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.3.1" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202311021"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="30" /> <uses-permission android:name="android.permission.RECEIVE_SMS" /> <!--鍙嬬洘--> diff --git a/HDL-ON_Android/Resources/Resource.designer.cs b/HDL-ON_Android/Resources/Resource.designer.cs index 485dc4b..af7c4b4 100644 --- a/HDL-ON_Android/Resources/Resource.designer.cs +++ b/HDL-ON_Android/Resources/Resource.designer.cs @@ -15,7 +15,7 @@ { - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.0.99")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.1.111")] public partial class Resource { diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist index dd41d60..e4af464 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.3.0</string> + <string>2.3.1</string> <key>CFBundleURLTypes</key> <array> <dict> @@ -36,7 +36,7 @@ </dict> </array> <key>CFBundleVersion</key> - <string>2.3.0</string> + <string>2.3.1</string> <key>LSApplicationQueriesSchemes</key> <array> <string>weixinULAPI</string> diff --git a/HDL-ON_iOS/ViewController.cs b/HDL-ON_iOS/ViewController.cs index 52dee5d..5e5749e 100644 --- a/HDL-ON_iOS/ViewController.cs +++ b/HDL-ON_iOS/ViewController.cs @@ -22,6 +22,13 @@ } } + // 鍒囨崲鍒扮珫灞忔ā寮� + public override UIInterfaceOrientationMask GetSupportedInterfaceOrientations() + { + return UIInterfaceOrientationMask.Portrait; + } + + public override void ViewDidLoad() { base.ViewDidLoad(); diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs index 51866d6..4353a7f 100644 --- a/HDL_ON/DAL/Mqtt/MqttClient.cs +++ b/HDL_ON/DAL/Mqtt/MqttClient.cs @@ -133,10 +133,6 @@ new System.Threading.Thread(async () => { while (true) { - if (!UserInfo.Current.IsLogin) - { - return; - } try { System.Threading.Thread.Sleep(2000); @@ -149,6 +145,7 @@ await StartCloudMqtt(); await SubscribeTopics(); + } catch { } } @@ -984,7 +981,7 @@ MqttInfoConfig.Current.mMqttInfo = mqttInfoRequestResult_Obj; - await MQTTConnectAsync(); + //await MQTTConnectAsync(); //1.鍒ゆ柇鏄惁缁戝畾浜嗙綉鍏筹紝鑾峰彇缃戝叧杩滅▼杩炴帴鐨勫姞瀵咾EY //if (DB_ResidenceData.Instance.CheckWhetherGatewayIsBound()) { diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs index 0c95e74..0be5794 100644 --- a/HDL_ON/DAL/Server/HttpUtil.cs +++ b/HDL_ON/DAL/Server/HttpUtil.cs @@ -213,7 +213,7 @@ if(apiPath == NewAPI.API_POST_Login) { var ddd = Newtonsoft.Json.JsonConvert.SerializeObject(response); - Console.WriteLine(ddd); + //Console.WriteLine(ddd); } if (response.StatusCode == HttpStatusCode.OK) { diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs index 6f0454c..3d6d3c4 100644 --- a/HDL_ON/UI/MainPage.cs +++ b/HDL_ON/UI/MainPage.cs @@ -26,7 +26,7 @@ /// <summary> /// 鐗堟湰鍙� /// </summary> - public static string VersionString = "2.3.0"; + public static string VersionString = "2.3.1"; ///// <summary> ///// 瀹㈡埛绔被鍨� ///// </summary> @@ -632,11 +632,9 @@ public static void Log(string msg) { #if DEBUG - if (msg.Contains("鏀跺埌鏁版嵁") - || msg.Contains("鍙戦��") - || msg.Contains("鎺ユ敹鍒版帹閫�") - || msg.Contains("api") - || msg.Contains("璇诲彇鍔熻兘鐘舵��") + if (msg.Contains("鏀跺埌") + //|| msg.Contains("鍙戦��") + //|| msg.Contains("鎺ユ敹") || true ) Console.WriteLine(msg); diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs index d4ba44d..87bea6c 100644 --- a/HDL_ON/UI/UI1-Login/LoginPage.cs +++ b/HDL_ON/UI/UI1-Login/LoginPage.cs @@ -330,7 +330,7 @@ etAccount.Text = "13533335801"; etAccount.Text = "13682244600"; etAccount.Text = "marketing@australindo.co.id"; - etAccount.Text = "dcai.assist@gmail.com"; + etAccount.Text = "support7@hdlautomation.com"; } else -- Gitblit v1.8.0