From f71e74b5f0d2716fbf05da016cdaa18d64e09f80 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期四, 31 十二月 2020 17:01:18 +0800
Subject: [PATCH] 又换完成最新门锁。空气质量传感器完成数据和基本配置功能。开发图表和自动化的同事可下载此代码

---
 ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs
index 756529e..7c14bee 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs
@@ -225,7 +225,7 @@
                 {
                     return false;
                 }
-                if (int.Parse(versionResult.FirmwareVersion.Replace(".", "")) > int.Parse(CommonPage.CodeIDString.Replace(".", "")))
+                if (versionResult.FirmwareVersion.CompareTo(CommonPage.CodeIDString) > 0)
                 {
                     distributedMark = versionResult.DistributedMark;
                     return true;
@@ -301,7 +301,7 @@
             try
             {
                 var webClient = new WebClient { };
-                var result = await webClient.DownloadDataTaskAsync("https://itunes.apple.com/lookup?id=1461693569");
+                var result = await webClient.DownloadDataTaskAsync("https://itunes.apple.com/lookup?id=1528702586");
                 if (result == null)
                 {
                     return null;
@@ -318,7 +318,7 @@
         /// </summary>
         public void OpenUrl()
         {
-            Uri url = new Uri("https://itunes.apple.com/cn/app/hdl-home/id1461693569?mt=8");
+            Uri url = new Uri("https://itunes.apple.com/cn/app/hdl-home/id1528702586?mt=8");
             UIKit.UIApplication.SharedApplication.OpenUrl(url);
         }
 #elif Android
@@ -382,19 +382,17 @@
                     {
                         return null;
                     }
-                    int MaxIndex = 0;
-                    int NewVersion = 0;
+
+                    Common.ResponseEntity.ApkInfoOBJ apkInfoOBJ = null;
                     for (int i = 0; i < responeData.pageData.Count; i++)
                     {
                         var apkInfo = responeData.pageData[i];
-                        var version = int.Parse(apkInfo.FirmwareVersion.Replace(".", ""));
-                        if (version > NewVersion)
+                        if (apkInfoOBJ == null || apkInfo.FirmwareVersion.CompareTo(apkInfoOBJ.FirmwareVersion) > 0)
                         {
-                            NewVersion = version;
-                            MaxIndex = i;
+                            apkInfoOBJ = apkInfo;
                         }
                     }
-                    return responeData.pageData[MaxIndex];
+                    return apkInfoOBJ;
                 }
                 return null;
             }

--
Gitblit v1.8.0