From 193d68dedf75522509e1118b20468132016ab429 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期四, 12 九月 2024 09:04:26 +0800
Subject: [PATCH] Update ClassificationPageBLL.cs
---
HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordPage.cs | 79 ++++++++++++++++++++++++++++++---------
1 files changed, 60 insertions(+), 19 deletions(-)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordPage.cs
index 61fff82..2429551 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordPage.cs
@@ -23,6 +23,11 @@
#region 鎺т欢View
/// <summary>
+ /// 鍘熷瘑鐮佹枃鏈
+ /// </summary>
+ EditText etOldPwd;
+
+ /// <summary>
/// 瀵嗙爜鏂囨湰妗�
/// </summary>
EditText etPassword;
@@ -62,12 +67,49 @@
isHitBack = true;
};
- new TopViewDiv(bodyView, Language.StringByID(StringId.ModifyPassword)).LoadTopView(backAction);
+ var topView = new TopViewDiv(bodyView, Language.StringByID(StringId.ModifyPassword));
+ topView.maginY = 10;
+ topView.LoadTopView();
+
+
+ #region 鍘熷瘑鐮�
+ FrameLayout oldPwdView = new FrameLayout()
+ {
+ Y = Application.GetRealHeight(64+10),
+ Height = Application.GetRealHeight(50),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ };
+ bodyView.AddChidren(oldPwdView);
+
+ Button btnOldPwdTitle = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ Width = Application.GetRealWidth(180),
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextAlignment = TextAlignment.CenterLeft,
+ Text = Language.StringByID(StringId.OriginalPassword) + ":"
+ };
+ oldPwdView.AddChidren(btnOldPwdTitle);
+
+ etOldPwd = new EditText()
+ {
+ Width = Application.GetRealWidth(359),
+ TextColor = CSS_Color.PromptingColor1,
+ TextSize = CSS_FontSize.TextFontSize,
+ SecureTextEntry = true,
+ TextAlignment = TextAlignment.CenterRight,
+ Foucs = true
+ };
+ oldPwdView.AddChidren(etOldPwd);
+ oldPwdView.AddChidren(new LineView(oldPwdView.Height));
+ #endregion
+
#region 鏂板瘑鐮�
FrameLayout rowView = new FrameLayout()
{
- Y = Application.GetRealHeight(64),
+ Y = oldPwdView.Bottom ,
Height = Application.GetRealHeight(50),
BackgroundColor = CSS_Color.MainBackgroundColor,
};
@@ -92,7 +134,6 @@
TextSize = CSS_FontSize.TextFontSize,
SecureTextEntry = true,
TextAlignment = TextAlignment.CenterRight,
- Foucs = true
};
rowView.AddChidren(etPassword);
var lineView = new LineView(rowView.Height);
@@ -156,24 +197,24 @@
public partial class ResetPasswordPage
{
- /// <summary>
- /// 鎸囧畾鍏抽棴椤甸潰涓暟
- /// </summary>
- /// <param name="countPage"></param>
- void ClosePageWithCount(int countPage)
- {
- //鍏抽棴澶氬皯涓〉闈�
- for (int i = 0; i < countPage; i++)
- {
- MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent();
- }
- }
+ ///// <summary>
+ ///// 鎸囧畾鍏抽棴椤甸潰涓暟
+ ///// </summary>
+ ///// <param name="countPage"></param>
+ //void ClosePageWithCount(int countPage)
+ //{
+ // //鍏抽棴澶氬皯涓〉闈�
+ // for (int i = 0; i < countPage; i++)
+ // {
+ // MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1).RemoveFromParent();
+ // }
+ //}
/// <summary>
///
/// </summary>
/// <param name="password"></param>
- void ResetPassword(string password)
+ void ResetPassword(string oldPwd, string password)
{
//鏍¢獙瀵嗙爜鏄惁绗﹀悎瑕佹眰
@@ -211,13 +252,13 @@
try
{
// 蹇樿瀵嗙爜
- var resultObj = new HttpServerRequest().ForgetPassword(account, password, verCode, isPhone);
+ var resultObj = new HttpServerRequest().UpdataPassword(oldPwd, password);
if (resultObj.Code == StateCode.SUCCESS)
{
Application.RunOnMainThread(() =>
{
Utlis.ShowTip(Language.StringByID(StringId.PasswordChangeSuccessfully));
- ClosePageWithCount(2);
+ this.RemoveFromParent();
});
}
else
@@ -252,7 +293,7 @@
{
if (btnReset.IsSelected)
{
- ResetPassword(etPassword.Text.ToString());
+ ResetPassword(etOldPwd.Text.Trim().ToString(), etPassword.Text.ToString());
}
};
}
--
Gitblit v1.8.0