From f3e65daca7978b21b5888f49b1bf35e1a6e5d4fd Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 13 七月 2020 12:33:31 +0800
Subject: [PATCH] 新版本

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSafeguardLogic.cs |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSafeguardLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSafeguardLogic.cs
index d1d8ec5..32f3a09 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSafeguardLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSafeguardLogic.cs
@@ -77,7 +77,7 @@
                 this.ShowTipMsg(msg);
                 return false;
             }
-            var mainWayId = HdlGatewayLogic.Current.GetGatewayId(mainGateway);
+            var mainWayId = mainGateway.GwId;
 
             //涓婚鏁板浐瀹�5+3+1
             int topicCount = 9;
@@ -104,7 +104,7 @@
                 {
                     var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
 
-                    var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<ZigBee.Device.Safeguard.ErrorResponData>(jobject["Data"].ToString());
+                    var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
                     if (temp != null)
                     {
                         string msg = HdlCheckLogic.Current.CheckCommonErrorCode(temp.Error);
@@ -1366,7 +1366,7 @@
 
             if (this.UserPassword == null)
             {
-                var data = Global.ReadFileByDirectory(DirNameResourse.LocalMemoryDirectory, DirNameResourse.SafeguardUserPassword);
+                var data = HdlFileLogic.Current.ReadFileByteContent(DirNameResourse.SafeguardUserPassword);
                 if (data != null)
                 {
                     this.UserPassword = System.Text.Encoding.UTF8.GetString(data);
@@ -1384,7 +1384,7 @@
                 if (result != GarrisonMode.None && result != GarrisonMode.RemoveGarrison)
                 {
                     //淇濆瓨鍔犲瘑鐨勫瘑鐮佸埌鏈湴
-                    Global.WriteFileToDirectoryByBytes(DirNameResourse.LocalMemoryDirectory, DirNameResourse.SafeguardUserPassword, System.Text.Encoding.UTF8.GetBytes(this.UserPassword));
+                    HdlFileLogic.Current.SaveTextToFile(DirNameResourse.SafeguardUserPassword, this.UserPassword);
                 }
                 return result;
             }
@@ -1473,7 +1473,7 @@
                     if (result2 != GarrisonMode.None && result2 != GarrisonMode.RemoveGarrison)
                     {
                         //淇濆瓨鍔犲瘑瀵嗙爜鍒版湰鍦�
-                        Global.WriteFileToDirectoryByBytes(DirNameResourse.LocalMemoryDirectory, DirNameResourse.SafeguardUserPassword, System.Text.Encoding.UTF8.GetBytes(this.UserPassword));
+                        HdlFileLogic.Current.SaveTextToFile(DirNameResourse.SafeguardUserPassword, this.UserPassword);
                     }
                     return result2;
                 }
@@ -1588,7 +1588,7 @@
                     if (result2 != -1)
                     {
                         //淇濆瓨鍒板姞瀵嗗瘑鐮佹湰鍦�
-                        Global.WriteFileToDirectoryByBytes(DirNameResourse.LocalMemoryDirectory, DirNameResourse.SafeguardUserPassword, System.Text.Encoding.UTF8.GetBytes(this.UserPassword));
+                        HdlFileLogic.Current.SaveTextToFile(DirNameResourse.SafeguardUserPassword, this.UserPassword);
                     }
                     return result2;
                 }
@@ -2154,7 +2154,7 @@
             bool success = false;
             //瓒呮椂鏃堕棿
             int TimeOut = 0;
-            string checkTopic = HdlGatewayLogic.Current.GetGatewayId(realWay) + "/Security/AdminSetNewPassword_Respon";
+            string checkTopic = realWay.GwId + "/Security/AdminSetNewPassword_Respon";
             Action<string, string> getResultAction = (topic, message) =>
             {
                 try

--
Gitblit v1.8.0