From 6c8946b21635246355ec41f216426783685a14b2 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 14 十月 2020 09:14:09 +0800
Subject: [PATCH] 20201013
---
HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/BindAccountPage.cs | 50 +++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 45 insertions(+), 5 deletions(-)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/BindAccountPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/BindAccountPage.cs
index 44f8ab4..3dc8e8e 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/BindAccountPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AccountBindInfo/BindAccountPage.cs
@@ -42,7 +42,7 @@
TextColor = CSS_Color.FirstLevelTitleColor,
TextSize = CSS_FontSize.SubheadingFontSize,
TextAlignment = TextAlignment.CenterLeft,
- TextID = titleId == StringId.BindEmail ? StringId.EntryBindEmail : StringId.BindPhone,
+ TextID = titleId == StringId.BindEmail ? StringId.EntryNewEmail : StringId.EntryNewPhone,
};
rowView.AddChidren(btnTitle);
@@ -86,15 +86,27 @@
void LoadEvent_BindEmail()
{
btnBind.MouseUpEventHandler = (sender, e) => {
+ Application.HideSoftInput();
var account = etContent.Text.Trim();
if (titleId == StringId.BindEmail)
{
+ if (account == MainPage.LoginUser.userEmailInfo)
+ {
+ var tip = new Tip()
+ {
+ Text = Language.StringByID(StringId.EmailIsSameNoNeedModfiy),
+ CloseTime = 1,
+ Direction = AMPopTipDirection.None
+ };
+ tip.Show(bodyView);
+ return;
+ }
if (!Regex.IsMatch(account, "([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-])+\\.)+([a-zA-Z0-9]{2,5})+"))
{
var tip = new Tip()
{
Text = Language.StringByID(StringId.PlsEntryCorrectEmailAddress),
- CloseTime = 3,
+ CloseTime = 1,
Direction = AMPopTipDirection.None
};
tip.Show(bodyView);
@@ -103,12 +115,23 @@
}
else if (titleId == StringId.BindPhone)
{
+ if(account == MainPage.LoginUser.userMobileInfo)
+ {
+ var tip = new Tip()
+ {
+ Text = Language.StringByID(StringId.PhoneNumberIsSameNoNeedModfiy),
+ CloseTime = 1,
+ Direction = AMPopTipDirection.None
+ };
+ tip.Show(bodyView);
+ return;
+ }
if (!Regex.IsMatch(account, @"^[1]+\d{10}") || (account.Length != 11))
{
var tip = new Tip()
{
Text = Language.StringByID(StringId.PlsEntryCorrectMobilNeumber),
- CloseTime = 3,
+ CloseTime = 1,
Direction = AMPopTipDirection.None
};
tip.Show(bodyView);
@@ -143,18 +166,35 @@
for (int i = 0; i < 3; i++)
{
- MainPage.BasePageView.RemoveAt(MainPage.BasePageView.ChildrenCount - 1);
+ MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent();
}
action(account);
});
}
else
{
+ var tipMsg = "";
+
Application.RunOnMainThread(() =>
{
var page = new OperationResultDisPalyPage();
page.Show();
- page.LoadPage(false, Language.StringByID(StringId.BindEmail), Language.StringByID(StringId.BindEmailFail), "");
+ if (titleId == StringId.BindEmail)
+ {
+ if (result == "Exist")
+ {
+ tipMsg = Language.StringByID(StringId.EmailAlreadyUse);
+ }
+ page.LoadPage(false, Language.StringByID(StringId.BindEmail), Language.StringByID(StringId.BindEmailFail) + "," + tipMsg, "");
+ }
+ else
+ {
+ if (result == "Exist")
+ {
+ tipMsg = Language.StringByID(StringId.PhoneNumberAlreadyUse);
+ }
+ page.LoadPage(false, Language.StringByID(StringId.BindPhone), Language.StringByID(StringId.BindPhoneFail) + "," + tipMsg, "");
+ }
});
}
})
--
Gitblit v1.8.0