ziwen 2 ani în urmă
părinte
comite
78a426329c
2 a modificat fișierele cu 4 adăugiri și 5 ștergeri
  1. 3 4
      controllers/user.go
  2. 1 1
      models/article_comment.go

+ 3 - 4
controllers/user.go

@@ -889,7 +889,6 @@ func (this *UserController) CommnetList() {
 		}
 		if comment.ArticleId > 0 {
 			item.RedirectType = 1
-			item.Id = item.ArticleId
 		} else if comment.IndustryId > 0 {
 			detail, err := models.GetIndustrialManagementDetail(comment.IndustryId)
 			if err != nil {
@@ -898,11 +897,11 @@ func (this *UserController) CommnetList() {
 				return
 			}
 			item.RedirectType = 3
-			item.Id = item.VideoId
 			item.ChartPermissionId = detail.ChartPermissionId
-		} else if comment.ActivityId > 0 {
+		} else if comment.ActivityId > 0 && comment.VideoId == 0 {
 			item.RedirectType = 2
-			item.Id = item.ActivityId
+		} else if comment.IndustryId == 0 && comment.VideoId > 0 {
+			item.RedirectType = 4
 		}
 		resp.List = append(resp.List, &item)
 	}

+ 1 - 1
models/article_comment.go

@@ -79,7 +79,7 @@ type CygxArticleCommentResp struct {
 	CompanyName       string `description:"公司名称"`
 	Content           string `description:"内容"`
 	Title             string `description:"标题"`
-	RedirectType      int    `description:"跳转类型 1文章 2活动 3产业视频"`
+	RedirectType      int    `description:"跳转类型 1文章 2活动音频 3产业视频 4活动视频"`
 }
 
 type CygxCommentListResp struct {