作者 yangfu

fix: 草稿箱修改

@@ -50,7 +50,10 @@ func (l *MiniSearchArticleDraftMeLogic) MiniSearchArticleDraftMe(req *types.Mini @@ -50,7 +50,10 @@ func (l *MiniSearchArticleDraftMeLogic) MiniSearchArticleDraftMe(req *types.Mini
50 draftInfo := draftList[i] 50 draftInfo := draftList[i]
51 var paragraphs = make([]types.Paragraph, 0) 51 var paragraphs = make([]types.Paragraph, 0)
52 lo.ForEach(draftInfo.Section, func(p *domain.ArticleSection, index int) { 52 lo.ForEach(draftInfo.Section, func(p *domain.ArticleSection, index int) {
53 - paragraphs = append(paragraphs, core.NewTypesParagraph(p.ParagraphTemplate)) 53 + item := core.NewTypesParagraph(p.ParagraphTemplate)
  54 + item.Text = p.Content
  55 + item.Images = p.Images
  56 + paragraphs = append(paragraphs, item)
54 }) 57 })
55 58
56 if len(paragraphs) == 0 && len(draftInfo.Content) > 0 { 59 if len(paragraphs) == 0 && len(draftInfo.Content) > 0 {
@@ -347,6 +347,7 @@ func NewArticleSectionFromParagraphs(paragraphs []types.Paragraph, companyId int @@ -347,6 +347,7 @@ func NewArticleSectionFromParagraphs(paragraphs []types.Paragraph, companyId int
347 ParagraphType: paragraph.Type, 347 ParagraphType: paragraph.Type,
348 ParagraphTemplate: core.NewDomainParagraph(paragraph), 348 ParagraphTemplate: core.NewDomainParagraph(paragraph),
349 } 349 }
  350 + section.Images = paragraph.Images
350 articleSections = append(articleSections, &section) 351 articleSections = append(articleSections, &section)
351 sortBy++ 352 sortBy++
352 } 353 }