From 23aaa6e672053d907acbc30bdbb5cf6e8ee6b937 Mon Sep 17 00:00:00 2001 From: lss <lsc@hdlchina.com.cn> Date: 星期三, 15 六月 2022 13:53:24 +0800 Subject: [PATCH] 2022-6-15 --- HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorQRCodePage.cs | 23 ++++++++++++++++++----- 1 files changed, 18 insertions(+), 5 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorQRCodePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorQRCodePage.cs index 26a6115..7cceca1 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorQRCodePage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorQRCodePage.cs @@ -1,10 +1,10 @@ 锘縰sing System; using HDL_ON.UI.CSS; using Shared; -using Com.Hdl.Hdllinphonesdk.Dialog; using HDL_ON.DAL.Server; using System.Collections.Generic; using Com.Hdl.Hdllinphonesdk.Utils; +using Com.Hdl.Hdllinphonesdk.Dialog; namespace HDL_ON.UI.UI2.PersonalCenter.Visitor { @@ -22,27 +22,41 @@ private Button visitorVoucherBtn; private VisitorTempPassword tempPassword; + Action backAction;// 鍚庨��鎸夐敭锛屽埛鏂癠I + public VisitorQRCodePage() { bodyView = this; } - public VisitorQRCodePage(VisitorTempPassword pwd) + public VisitorQRCodePage(Action action,VisitorTempPassword pwd) { bodyView = this; this.tempPassword = pwd; + backAction = action; + } + + public override void RemoveFromParent() + { + this.tempPassword = null; + backAction?.Invoke(); + base.RemoveFromParent(); } public void LoadPage() { #region 椤堕儴瀵艰埅鏍� - if (tempPassword == null) + if (tempPassword == null|| tempPassword.id==null) { tempPassword = new VisitorTempPassword(); Action click = () => { - VisitorHistoryPage page = new VisitorHistoryPage(); + Action action = () => + { + LoadPage(); + }; + VisitorHistoryPage page = new VisitorHistoryPage(action); MainPage.BasePageView.AddChidren(page); page.LoadPage(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; @@ -51,7 +65,6 @@ bodyView.BackgroundColor = CSS_Color.BackgroundColor; new TopViewDiv(bodyView, Language.StringByID(StringId.VisitorInvitation)) .LoadTopView_SettingText(click, Language.StringByID(StringId.VisitorRecord)); - } else { -- Gitblit v1.8.0