Explorar o código

详情接口增加昵称

ziwen %!s(int64=2) %!d(string=hai) anos
pai
achega
d055d195fc
Modificáronse 2 ficheiros con 2 adicións e 0 borrados
  1. 1 0
      controllers/article.go
  2. 1 0
      models/article.go

+ 1 - 0
controllers/article.go

@@ -689,6 +689,7 @@ func (this *ArticleControllerMobile) DetailMd5() {
 			departmentDetail, err := models.GetArticleDepartmentDateilById(detail.DepartmentId)
 			if err == nil {
 				detail.DepartmentImgUrl = departmentDetail.ImgUrl
+				detail.NickName = departmentDetail.NickName
 			}
 		}
 	}

+ 1 - 0
models/article.go

@@ -138,6 +138,7 @@ type ArticleDetail struct {
 	CollectionNum           int    `description:"收藏数量"`
 	DepartmentId            int    `description:"作者ID"`
 	DepartmentImgUrl        string `description:"作者头像"`
+	NickName                string `description:"作者昵称"`
 	SubjectIds              string `description:"文章关联标的的ID字符串"`
 	IndustrialAndSubjectIds string `description:"文章关联产业和标的的ID字符串"`
 	IndustrialManagementId  int    `description:"文章关联产业ID"`