From 4d99d576aac9d1b1dcebc122c4421949d148c135 Mon Sep 17 00:00:00 2001 From: "jay.chang" Date: Wed, 14 Aug 2024 17:11:10 +0800 Subject: [PATCH] =?UTF-8?q?[Backend]=E5=BE=8C=E5=8F=B0=E6=96=B0=E8=B4=88?= =?UTF-8?q?=E5=B8=B3=E8=99=9F=E9=96=8B=E6=94=BE=E4=BD=BF=E7=94=A8=E8=80=85?= =?UTF-8?q?=E8=87=AA=E8=A1=8C=E8=BC=B8=E5=85=A5=E5=AF=86=E7=A2=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Backend/Controllers/UserInfoController.cs | 2 +- Backend/Models/UserInfo.cs | 1 + Backend/Views/UserInfo/Index.cshtml | 3 ++- Backend/Views/UserInfo/_UserManager.cshtml | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Backend/Controllers/UserInfoController.cs b/Backend/Controllers/UserInfoController.cs index 39056d4..c1f9ec4 100644 --- a/Backend/Controllers/UserInfoController.cs +++ b/Backend/Controllers/UserInfoController.cs @@ -137,7 +137,7 @@ namespace Backend.Controllers string random_password = new string(Enumerable.Repeat(chars, 8).Select(s => s[random.Next(chars.Length)]).ToArray()); //var newPassword = edFunction.GetSHA256Encryption(random_password); - var newPassword = edFunction.GetSHA256Encryption("123456"); + var newPassword = edFunction.GetSHA256Encryption(post.Password); //產生一組GUID var guid = Guid.NewGuid(); //使用者GUID diff --git a/Backend/Models/UserInfo.cs b/Backend/Models/UserInfo.cs index 933aa81..b56753f 100644 --- a/Backend/Models/UserInfo.cs +++ b/Backend/Models/UserInfo.cs @@ -60,6 +60,7 @@ namespace Backend.Models { public string Id { get; set; } public string Name { get; set; } //姓名 + public string Password { get; set; } //密碼 public string Email { get; set; } //信箱 public string Account { get; set; } //帳號 public string Phone { get; set; } //手機號碼 diff --git a/Backend/Views/UserInfo/Index.cshtml b/Backend/Views/UserInfo/Index.cshtml index e894251..96af220 100644 --- a/Backend/Views/UserInfo/Index.cshtml +++ b/Backend/Views/UserInfo/Index.cshtml @@ -329,8 +329,9 @@ var send_data = { Id: selected_id, Name: $("#user_name_modal").val(), + Password: $("#user_password_modal").val(), Email: $("#user_email_modal").val(), - Account: $("#user_account_modal").val(), + Account: $("#user_account_modal").val(), Phone: $("#user_phone_modal").val(), RoleId: $("#user_role_modal").val() } diff --git a/Backend/Views/UserInfo/_UserManager.cshtml b/Backend/Views/UserInfo/_UserManager.cshtml index 8a62738..7f39615 100644 --- a/Backend/Views/UserInfo/_UserManager.cshtml +++ b/Backend/Views/UserInfo/_UserManager.cshtml @@ -63,7 +63,7 @@
- +