public async Task Comment([FromBody] ArticleCommentInput comment) { //获取验证码 string _code = HttpContext.Session.GetString(StringSession.ArticleCommentKey); if (string.IsNullOrEmpty(_code) || _code != comment.Code.ToLower()) { throw new UserFriendlyException(403, "验证码有误"); } await _blogAppService.CreateArticleCommentAsync(comment); HttpContext.Session.Remove(StringSession.ArticleCommentKey); }