Browse Source

Merge branch 'myfx_2.1' of http://8.136.199.33:3000/cxzhang/hongze_web_mfyx into debug

xingzai 1 year ago
parent
commit
71d7f1e2ba
1 changed files with 7 additions and 0 deletions
  1. 7 0
      controllers/article.go

+ 7 - 0
controllers/article.go

@@ -342,6 +342,13 @@ Loop:
 		}
 	}
 	detail.ShareImg = services.GetArticleShareImg(articleId)
+	//作者头像
+	if detail.DepartmentId > 0 {
+		departmentDetail, err := models.GetArticleDepartmentDateilById(detail.DepartmentId)
+		if err == nil {
+			detail.ShareImg = departmentDetail.ImgUrl
+		}
+	}
 	resp.HasPermission = hasPermission
 	resp.IsSpecialArticle = detail.IsSpecialArticle
 	resp.Detail = detail