lss
2022-06-15 23aaa6e672053d907acbc30bdbb5cf6e8ee6b937
HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorQRCodePage.cs
@@ -1,10 +1,10 @@
using 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;// 后退按键,刷新UI
        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
            {
@@ -389,13 +402,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 +439,7 @@
                    return;
                }
                if (pwdEditText.Text.Trim().Length != 6)
                if (pwdEditText.Text.Trim() == "" || pwdEditText.Text.Trim().Length != 6)
                {
                    var tip_dialog = new Tip()
                    {