Kaynağa Gözat

Merge branch 'yb/3.0' of hongze/hongze_yb into master

hsun 2 yıl önce
ebeveyn
işleme
5f01c5644d

+ 1 - 1
models/response/classify.go

@@ -23,7 +23,7 @@ type ClassifyDetail struct {
 	Descript        string               `json:"descript"`
 	PermissionCheck *PermissionCheckInfo `json:"permission_check"`
 	AuthOk          bool                 `json:"auth_ok"`
-	VipTitle        string               `json:"vip_title"'`
+	VipTitle        string               `json:"vip_title"`
 }
 
 type ClassReportListItem struct {

+ 1 - 1
models/tables/rddp/classify/query.go

@@ -58,7 +58,7 @@ func GetByClassifyId(id int) (item *Classify, err error) {
 // GetListByPid 根据分类名称查找专栏列表
 func GetListByPid(pid int) (list []*Classify, err error) {
 	err = global.MYSQL["rddp"].Model(Classify{}).
-		Select("id, classify_name, parent_id, report_author, author_descript, home_img_url, vip_title").
+		Select("id, classify_name, parent_id, report_author, author_descript, home_img_url, vip_title, avatar_img_url").
 		Where("parent_id = ? AND is_show = 1 ", pid).Order("sort asc, id asc").Scan(&list).Error
 	if err == utils.ErrNoRow {
 		err = nil

+ 2 - 2
services/report/classify.go

@@ -71,7 +71,7 @@ func GetClassListByClassifyId(user user.UserInfo, classifyIdFirst int) (list []*
 		temp.ParentId = item.ParentId
 		temp.AuthorDescript = item.AuthorDescript
 		temp.ReportAuthor = item.ReportAuthor
-		temp.HomeImgUrl = item.HomeImgUrl
+		temp.HomeImgUrl = item.AvatarImgUrl	// 此处图片用二级分类的"头像"
 		temp.ClassifyNameSecond = item.ClassifyName
 		temp.VipTitle = item.VipTitle
 		if classifyInfo.ClassifyName == "权益研报" {
@@ -232,7 +232,7 @@ func GetClassifyReportList(user user.UserInfo, classifyIdSecond int, pageIndex,
 				reportItem.Abstract = "<div style=\"overflow: hidden;white-space: nowrap;text-overflow: ellipsis;\">" +reportInfo.Abstract+"</div>"
 			}
 			reportItem.Author = reportInfo.Author
-			reportItem.ReportImgUrl = classifyInfo.ReportImgUrl
+			reportItem.ReportImgUrl = classifyInfo.AvatarImgUrl	// 此处图片用二级分类的"头像"
 			reportItem.VideoName = reportInfo.VideoName
 			reportItem.VideoPlaySeconds = reportInfo.VideoPlaySeconds
 			if  reportInfo.VideoUrl != "" && reportInfo.VideoName == "" {