瀏覽代碼

文章详情bug处理

xingzai 3 年之前
父節點
當前提交
b9eaf461a8
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      controllers/article.go

+ 2 - 3
controllers/article.go

@@ -40,8 +40,8 @@ func (this *ArticleController) Detail() {
 	uid := user.UserId
 	articleId, err := this.GetInt("ArticleId")
 	if articleId <= 0 {
-		br.Msg = "参数错误"
-		br.ErrMsg = "参数错误"
+		br.Msg = "文章不存在"
+		br.ErrMsg = "文章不存在,文章ID错误"
 		return
 	}
 	detail := new(models.ArticleDetail)
@@ -64,7 +64,6 @@ func (this *ArticleController) Detail() {
 			return
 		}
 		detail, err = models.GetArticleDetailById(articleId)
-		//services.BodyAnalysis2(detail.Body)
 		if err != nil {
 			br.Msg = "获取信息失败"
 			br.ErrMsg = "获取信息失败,Err:" + err.Error()