public IActionResult Delete([FromQuery] Admin admin) { if (!JudgeRoles(1)) { return(Json(new { code = -1, msg = "您没有权限进行此操作!" })); } admin = AdminSystem.GetAdminById(admin); if (AdminSystem.DeleteAdmin(admin)) { AdminSystem.AddLog(GetAdminName(), "删除用户:" + admin.Username); return(Json(new { code = 0, msg = "删除成功!" })); } return(Json(new { code = 0, msg = "删除失败!" })); }