From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 17 十二月 2020 09:07:13 +0800 Subject: [PATCH] 新云端Ver1.3 --- ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TemporaryPassword.cs | 41 ++++++++++++++++++++++------------------- 1 files changed, 22 insertions(+), 19 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TemporaryPassword.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TemporaryPassword.cs index 68c6c1c..b48a58d 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TemporaryPassword.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/TemporaryPassword.cs @@ -570,14 +570,15 @@ if (doorLock.tempPasswordObject != null) { var addDoorLockTempPasswordData = new ZigBee.Device.DoorLock.AddDoorLockTempPasswordData(); - if (UserCenterResourse.UserInfo.AuthorityNo != 1) + if (HdlUserCenterResourse.ResidenceOption.AuthorityNo != 1) { - addDoorLockTempPasswordData.LoginAccessToken = UserCenterLogic.GetConnectMainToken(); + //鈽嗐優銉笺偗鈽� + //addDoorLockTempPasswordData.LoginAccessToken = UserCenterLogic.GetConnectMainToken(); addDoorLockTempPasswordData.IsOtherAccountCtrl = true; } //瀵瑰瘑鐮佽繘琛屽姞瀵嗗鐞� string hdlKey = "hD1(La3o"; - var enPsw = UserCenterLogic.EncryptPassword(hdlKey, doorLock.tempPasswordObject.TempPassword); + var enPsw = HdlCommonLogic.Current.EncryptPassword(hdlKey, doorLock.tempPasswordObject.TempPassword); addDoorLockTempPasswordData.TempPwd = enPsw; if (doorLock.DeviceAddr != null) { @@ -597,7 +598,7 @@ }); return; } - if (result1.StateCode != "Success") + if (result1.Code != HttpMessageEnum.A鎴愬姛) { Application.RunOnMainThread(() => { @@ -708,7 +709,7 @@ { dialog.Close(); string msg = Language.StringByID(R.MyInternationalizationString.SureToDeleteTempPassword); - var alert = new Shared.Phone.UserCenter.ShowMsgControl(ShowMsgType.Confirm, msg, Language.StringByID(R.MyInternationalizationString.DoorlockConfirm)); + var alert = new ShowMsgControl(ShowMsgType.Confirm, msg, Language.StringByID(R.MyInternationalizationString.DoorlockConfirm)); alert.Show(); //浣跨敤纭鍨嬪脊妗嗘椂,鐨勫洖璋冨嚱鏁� alert.ConfirmClickEvent += () => @@ -743,9 +744,10 @@ if (resultData.defaultControlResponseData.status == 0 || resultData.defaultControlResponseData.status == 2) { var delDoorLockTempPasswordData = new ZigBee.Device.DoorLock.DelDoorLockTempPasswordData(); - if (UserCenterResourse.UserInfo.AuthorityNo != 1) + if (HdlUserCenterResourse.ResidenceOption.AuthorityNo != 1) { - delDoorLockTempPasswordData.LoginAccessToken = UserCenterLogic.GetConnectMainToken(); + //鈽嗐優銉笺偗鈽� + //delDoorLockTempPasswordData.LoginAccessToken = UserCenterLogic.GetConnectMainToken(); delDoorLockTempPasswordData.IsOtherAccountCtrl = true; } if (doorLock.DeviceAddr != null) @@ -755,7 +757,7 @@ var result1 = await ZigBee.Device.DoorLock.SendDoorLockToServer("DoorLock/DelDoorLockPwd", delDoorLockTempPasswordData); if (result1 != null) { - if (result1.StateCode == "Success") + if (result1.Code == HttpMessageEnum.A鎴愬姛) { doorLock.tempPasswordObject = null; doorLock.LocalTempPassword = ""; @@ -820,9 +822,10 @@ try { var getDoorLockTempPasswordData = new ZigBee.Device.DoorLock.GetDoorLockTempPasswordData(); - if (UserCenterResourse.UserInfo.AuthorityNo != 1) + if (HdlUserCenterResourse.ResidenceOption.AuthorityNo != 1) { - getDoorLockTempPasswordData.LoginAccessToken = UserCenterLogic.GetConnectMainToken(); + //鈽嗐優銉笺偗鈽� + //getDoorLockTempPasswordData.LoginAccessToken = UserCenterLogic.GetConnectMainToken(); getDoorLockTempPasswordData.IsOtherAccountCtrl = true; } if (doorLock.DeviceAddr != null) @@ -842,7 +845,7 @@ tpObj.InValidTime = curDoorLockTempPaw.ValidEndTime; //瑙e瘑瀵嗙爜 string hdlKey = "hD1(La3o"; - var desPsw = UserCenterLogic.DecryptPassword(hdlKey, curDoorLockTempPaw.TempPwd); + var desPsw = HdlCommonLogic.Current.DecryptPassword(hdlKey, curDoorLockTempPaw.TempPwd); doorLock.LocalTempPassword = tpObj.TempPassword = desPsw; doorLock.tempPasswordObject = tpObj; TimeDateData(doorLock.tempPasswordObject.ValidTime, doorLock.tempPasswordObject.InValidTime); @@ -926,10 +929,10 @@ void TimeDisplay(Button validTime, Button validTimeDate, Button inValidTime, Button inValidTimeDate, bool isDefaultTime) { string hour = ""; - string minute = ""; + string minute = ""; if (isDefaultTime) - { - var cur = DateTime.Now; + { + var cur = DateTime.Now; DoorLockCommonInfo.ValidDateHour = cur.Hour; DoorLockCommonInfo.ValidDateMinute = cur.Minute; DoorLockCommonInfo.ValidDateSecond = cur.Second; @@ -938,8 +941,8 @@ DoorLockCommonInfo.InValidDateSecond = cur.Second; DoorLockCommonInfo.ValidDateYear = cur.Year; DoorLockCommonInfo.ValidDateMonth = cur.Month; - DoorLockCommonInfo.ValidDateDay = cur.Day; - + DoorLockCommonInfo.ValidDateDay = cur.Day; + var curD = DoorLockCommonInfo.LastDayOfMonth(cur); if (DoorLockCommonInfo.ValidDateDay == curD.Day) { @@ -961,9 +964,9 @@ DoorLockCommonInfo.InValidDateYear = cur.Year; DoorLockCommonInfo.InValidDateMonth = cur.Month; DoorLockCommonInfo.InValidDateDay = cur.Day + 1; - } - - //doorLock.ReSave(); + } + + //doorLock.ReSave(); } if (Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.ValidDateHour < 10) { -- Gitblit v1.8.0