[Backend]後台新贈帳號開放使用者自行輸入密碼

This commit is contained in:
張家睿 2024-08-14 17:11:10 +08:00
parent 49de1960e6
commit 4d99d576aa
4 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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; } //手機號碼

View File

@ -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()
}

View File

@ -63,7 +63,7 @@
<div class="form-group col-lg-6 user-password-div">
<label class="form-label" for="user_password_modal">密碼</label>
<input type="password" id="user_password_modal" name="user_password_modal" class="form-control" placeholder="由系統產生" disabled>
<input type="password" id="user_password_modal" name="user_password_modal" class="form-control">
</div>
<div class="form-group col-lg-6">