コード例 #1
0
 public IActionResult Delete([FromQuery] User user)
 {
     if (!JudgeRoles(1))
     {
         return(Json(new { code = -1, msg = "您没有权限进行此操作!" }));
     }
     if (UserSystem.DeleteUser(user))
     {
         AdminSystem.AddLog(GetAdminName(), "删除用户:" + user.Userid);
         return(Json(new { code = 0, msg = "删除成功!" }));
     }
     return(Json(new { code = -1, msg = "删除失败!" }));
 }