public IActionResult Changepwd([FromBody] Admin admin) { if (!JudgeRoles(1)) { return(Json(new { code = -1, msg = "您没有权限进行此操作!" })); } if (AdminSystem.ChangePassword(admin)) { AdminSystem.AddLog(GetAdminName(), "修改管理员" + admin.Username + "的密码"); return(Json(new { code = 0, msg = "密码修改成功" })); } return(Json(new { code = -1, msg = "密码修改失败" })); }