From d74ca60510ca40b39ff49029ac7c059fd92b08b9 Mon Sep 17 00:00:00 2001 From: lss <lsc@hdlchina.com.cn> Date: 星期一, 13 六月 2022 10:45:10 +0800 Subject: [PATCH] 2022-06-13 --- HDL-ON_Android/Assets/Language.ini | 6 +++ HDL_ON/Common/R.cs | 8 ++++ HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorQRCodePage.cs | 26 +++++++++++-- HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorHistoryPage.cs | 77 -------------------------------------- 4 files changed, 37 insertions(+), 80 deletions(-) diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini index 8f1e0e0..2d1cba1 100644 --- a/HDL-ON_Android/Assets/Language.ini +++ b/HDL-ON_Android/Assets/Language.ini @@ -534,6 +534,8 @@ 546=Visitor QR Code 547=Phone Number 548=Please enter a correct phone number +549=Please select a effective time +550=Please select a expire time 1000=Room Humidity @@ -1693,6 +1695,8 @@ 546=璁垮浜岀淮鐮� 547=鎵嬫満鍙� 548=璇疯緭鍏ユ纭殑鎵嬫満鍙风爜 +549=璇烽�夋嫨鐢熸晥鏃堕棿 +550=璇烽�夋嫨澶辨晥鏃堕棿 @@ -2833,6 +2837,8 @@ 546=Visitor QR Code 547=Phone Number 548=Please enter a correct phone number +549=Please select a effective time +550=Please select a expire time 1000=袙谢邪卸薪芯褋褌褜 胁 袩芯屑械褖械薪懈懈 diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs index 7e0e5a5..0afff81 100644 --- a/HDL_ON/Common/R.cs +++ b/HDL_ON/Common/R.cs @@ -5,6 +5,14 @@ public static class StringId { /// <summary> + /// 璁垮浜岀淮鐮佺粨鏉熸椂闂� + /// </summary> + public const int VisitorEndTime = 550; + /// <summary> + /// 璁垮浜岀淮鐮佸紑濮嬫椂闂� + /// </summary> + public const int VisitorStartTime = 549; + /// <summary> /// 鎵嬫満鍙� /// </summary> public const int PhoneNumberErrorTip = 548; diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorHistoryPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorHistoryPage.cs index 1f36b2b..9037df3 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorHistoryPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorHistoryPage.cs @@ -29,8 +29,7 @@ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; bodyView.BackgroundColor = CSS_Color.BackgroundColor; - new TopViewDiv(bodyView, Language.StringByID(StringId.VisitorInvitation)) - .LoadTopView_SettingText(click, ""); + new TopViewDiv(bodyView, Language.StringByID(StringId.VisitorInvitation)).LoadTopView_SettingText(click, ""); #endregion bodyScrolView = new VerticalScrolViewLayout() @@ -131,79 +130,5 @@ } private List<TempPasswordInfo> infoList; - private void getTestData() - { - infoList = new List<TempPasswordInfo>(); - TempPasswordInfo info = new TempPasswordInfo(); - info.homeId = 11111; - info.deviceId = 11111; - info.phone = "1234567890"; - info.tempPwd = "134234"; - info.useCount = 10; - info.validBeginTime = "2022/5/10 14:21:00"; - info.validEndTime = "2022/5/12 14:21:00"; - infoList.Add(info); - - info = new TempPasswordInfo(); - info.homeId = 11111; - info.deviceId = 11111; - info.phone = "1234567890"; - info.tempPwd = "134234"; - info.useCount = 10; - info.validBeginTime = "2022/5/10 14:21:00"; - info.validEndTime = "2022/5/12 14:21:00"; - infoList.Add(info); - - info = new TempPasswordInfo(); - info.homeId = 11111; - info.deviceId = 11111; - info.phone = "1234567890"; - info.tempPwd = "134234"; - info.useCount = 10; - info.validBeginTime = "2022/5/10 14:21:00"; - info.validEndTime = "2022/5/12 14:21:00"; - infoList.Add(info); - - info = new TempPasswordInfo(); - info.homeId = 11111; - info.deviceId = 11111; - info.phone = "1234567890"; - info.tempPwd = "134234"; - info.useCount = 10; - info.validBeginTime = "2022/5/10 14:21:00"; - info.validEndTime = "2022/5/12 14:21:00"; - infoList.Add(info); - - info = new TempPasswordInfo(); - info.homeId = 11111; - info.deviceId = 11111; - info.phone = "1234567890"; - info.tempPwd = "134234"; - info.useCount = 10; - info.validBeginTime = "2022/5/10 14:21:00"; - info.validEndTime = "2022/5/12 14:21:00"; - infoList.Add(info); - - info = new TempPasswordInfo(); - info.homeId = 11111; - info.deviceId = 11111; - info.phone = "1234567890"; - info.tempPwd = "134234"; - info.useCount = 10; - info.validBeginTime = "2022/5/10 14:21:00"; - info.validEndTime = "2022/5/12 14:21:00"; - infoList.Add(info); - - info = new TempPasswordInfo(); - info.homeId = 11111; - info.deviceId = 11111; - info.phone = "1234567890"; - info.tempPwd = "134234"; - info.useCount = 10; - info.validBeginTime = "2022/5/10 14:21:00"; - info.validEndTime = "2022/5/12 14:21:00"; - infoList.Add(info); - - } } } \ No newline at end of file diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorQRCodePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorQRCodePage.cs index 97bc8c8..26a6115 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorQRCodePage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorQRCodePage.cs @@ -389,13 +389,31 @@ }; visitorVoucherBtn.MouseUpEventHandler += (sender, e) => { - if (phoneNumberEditText.Text.Trim() == "" || pwdEditText.Text.Trim() == "" - || startTimeText.Text.Trim() == "" || endTimeText.Text.Trim() == "") + if (startTimeText.Text.Trim() == "") { + var tip_dialog = new Tip() + { + Text = Language.StringByID(StringId.VisitorStartTime), + CloseTime = 2, + Direction = AMPopTipDirection.None + }; + tip_dialog.Show(MainPage.BaseView); return; } - if (phoneNumberEditText.Text.Trim().Length != 11) + if (endTimeText.Text.Trim() == "") + { + var tip_dialog = new Tip() + { + Text = Language.StringByID(StringId.VisitorEndTime), + CloseTime = 2, + Direction = AMPopTipDirection.None + }; + tip_dialog.Show(MainPage.BaseView); + return; + } + + if (phoneNumberEditText.Text.Trim() == "" || phoneNumberEditText.Text.Trim().Length != 11) { var tip_dialog = new Tip() { @@ -408,7 +426,7 @@ return; } - if (pwdEditText.Text.Trim().Length != 6) + if (pwdEditText.Text.Trim() == "" || pwdEditText.Text.Trim().Length != 6) { var tip_dialog = new Tip() { -- Gitblit v1.8.0