From 07466c19110693e3e439a7d7c8ad0bc21d9b3287 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期三, 29 四月 2020 09:14:01 +0800 Subject: [PATCH] 优化代码,更改门锁需求接口 --- ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs | 26 ++++++++++++++++++++++---- 1 files changed, 22 insertions(+), 4 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs index c1f5955..c94de76 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs @@ -392,12 +392,30 @@ dialogForm.ComfirmClickEvent += ((textValue) => { dialogForm.CloseDialog(); - if (textValue == "2887") + if (textValue.StartsWith("2887") == true) { - //寮�鍚殣钘忚彍鍗� - UserCenterResourse.HideOption.CenterHideMenu = 1; + var myTime = DateTime.Now; + string strTime1 = myTime.ToString("HHmm"); + int value1 = Convert.ToInt32(strTime1.Substring(3, 1)); + string check1 = "2887" + strTime1 + (7 + value1).ToString(); + + myTime = myTime.AddMinutes(-1); + string strTime2 = myTime.ToString("HHmm"); + int value2 = Convert.ToInt32(strTime2.Substring(3, 1)); + string check2 = "2887" + strTime2 + (7 + value2).ToString(); + + myTime = myTime.AddMinutes(2); + string strTime3 = myTime.ToString("HHmm"); + int value3 = Convert.ToInt32(strTime3.Substring(3, 1)); + string check3 = "2887" + strTime3 + (7 + value3).ToString(); + + if (textValue == check1 || textValue == check2 || textValue == check3) + { + //寮�鍚殣钘忚彍鍗� + UserCenterResourse.HideOption.CenterHideMenu = 1; + } } - if (textValue == "0001") + if (textValue == "0001a") { var form = new Guide.GuideHouseForm(); form.ShowFrom(); -- Gitblit v1.8.0