From 452e8cef1c740d18ee398be6971d9952e41dbd4a Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 12 四月 2023 16:11:50 +0800
Subject: [PATCH] 1
---
HDL_ON/UI/UI2/4-PersonalCenter/ResetAccountPassword/ResetPasswordPage.cs | 74 ++++++++++++++++++++++++++++--------
1 files changed, 57 insertions(+), 17 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..7b49246 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;
@@ -64,10 +69,45 @@
new TopViewDiv(bodyView, Language.StringByID(StringId.ModifyPassword)).LoadTopView(backAction);
+
+ #region 鍘熷瘑鐮�
+ FrameLayout oldPwdView = new FrameLayout()
+ {
+ Y = Application.GetRealHeight(64),
+ 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,
};
@@ -156,24 +196,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 +251,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 +292,7 @@
{
if (btnReset.IsSelected)
{
- ResetPassword(etPassword.Text.ToString());
+ ResetPassword(etOldPwd.Text.Trim().ToString(), etPassword.Text.ToString());
}
};
}
--
Gitblit v1.8.0