wxr
2020-11-20 716d1b3b705e7d37e6edebd7f60b7613ab5aee87
HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/AccountBindInfoPage.cs
@@ -4,6 +4,9 @@
namespace HDL_ON.UI
{
    /// <summary>
    /// 已绑定手机或者邮箱的页面
    /// </summary>
    public partial class AccountBindInfoPage : FrameLayout
    {
        FrameLayout bodyView;
@@ -27,7 +30,7 @@
        /// </summary>
        /// <param name="act">刷新绑定信息方法</param>
        /// <param name="option">修复信息的类型:1:邮箱,2:手机</param>
        public void LoadPage(Action<string> act,int ot,int tId)
        public void LoadPage(Action<string> act, int ot, int tId)
        {
            action = act;
            optionType = ot;
@@ -50,7 +53,7 @@
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.SubheadingFontSize,
                TextAlignment = TextAlignment.CenterLeft,
                TextID = optionType == 1 ? StringId.CurrentEmail : StringId.CurPhone,
                TextID = optionType == 1 ? StringId.CurrentEmail : StringId.CurPhone,
            };
            rowView.AddChidren(btnTitle);
@@ -60,7 +63,7 @@
                TextColor = CSS_Color.PromptingColor1,
                TextSize = CSS_FontSize.TextFontSize,
                TextAlignment = TextAlignment.CenterRight,
                Text = optionType == 1 ? MainPage.LoginUser.userEmailInfo : MainPage.LoginUser.userMobileInfo,
                Text = optionType == 1 ?  UserInfo.Current.userEmailInfo :  UserInfo.Current.userMobileInfo,
            };
            rowView.AddChidren(btnContent);
@@ -82,7 +85,8 @@
            };
            bodyView.AddChidren(btnChangeBind);
            if( (!string.IsNullOrEmpty(MainPage.LoginUser.userMobileInfo) && optionType == 1) || (!string.IsNullOrEmpty(MainPage.LoginUser.userMobileInfo) && optionType == 2))
            //同时绑定邮箱或者手机才显示"更换验证方式"
            if (!string.IsNullOrEmpty( UserInfo.Current.userMobileInfo) && !string.IsNullOrEmpty( UserInfo.Current.userEmailInfo))
            {
                Button btnUnbind = new Button()
                {
@@ -111,16 +115,18 @@
        /// </summary>
        void LoadEvent_SkipChangeBandAccountInfo(Button button)
        {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
            {
                var cbe = new ChangeBindAccountPage();
                cbe.isUnbind = false;
                MainPage.BasePageView.AddChidren(cbe);
                if (optionType == 1)
                {
                    cbe.LoadPage(action, optionType, StringId.ModifyBindingEmail, StringId.CurrentEmail);
                    cbe.LoadPage(action, optionType, StringId.ModifyBindingEmail);
                }
                else if(optionType == 2)
                else if (optionType == 2)
                {
                    cbe.LoadPage(action, optionType, StringId.ModifyBindingPhone, StringId.CurPhone);
                    cbe.LoadPage(action, optionType, StringId.ModifyBindingPhone);
                }
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };
@@ -132,16 +138,18 @@
        /// </summary>
        void LoadEvent_SkipDelBandAccountInfo(Button button)
        {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
            EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
            {
                var cbe = new ChangeBindAccountPage();
                cbe.isUnbind = true;//是否为解绑标记
                MainPage.BasePageView.AddChidren(cbe);
                if (optionType == 1)
                {
                    cbe.LoadPage(action, optionType, StringId.UnbindEmail, StringId.CurrentEmail);
                    cbe.LoadPage(action, optionType, StringId.UnbindEmail);
                }
                else if(optionType == 2)
                else if (optionType == 2)
                {
                    cbe.LoadPage(action, optionType, StringId.UnbindPhone, StringId.CurPhone);
                    cbe.LoadPage(action, optionType, StringId.UnbindPhone);
                }
                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
            };