|
@@ -263,21 +263,6 @@ func GetChapterDetail(user user.UserInfo, reportChapterId int) (reportChapterDet
|
|
|
reportChapterItem.EndImg = reportInfo.EndImg
|
|
|
reportChapterItem.CanvasColor = reportInfo.CanvasColor
|
|
|
|
|
|
- // 图表授权token
|
|
|
- {
|
|
|
- isOpenChartExpired, e := base_config.CheckIsOpenChartExpired()
|
|
|
- if e != nil {
|
|
|
- err = errors.New("获取图表是否开启鉴权失败,err:" + e.Error())
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- if isOpenChartExpired {
|
|
|
- tokenMap := make(map[string]string)
|
|
|
- reportChapterItem.Content = HandleReportContent(reportChapterItem.Content, "add", tokenMap)
|
|
|
- reportChapterItem.ContentSub = HandleReportContent(reportChapterItem.ContentSub, "add", tokenMap)
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
// 手工上传的才返回
|
|
|
if reportInfo.VoiceGenerateType == 1 {
|
|
|
reportChapterItem.ReportVideoUrl = reportInfo.VideoUrl
|
|
@@ -352,6 +337,21 @@ func GetChapterDetail(user user.UserInfo, reportChapterId int) (reportChapterDet
|
|
|
reportChapterItem.ContentSub = html.UnescapeString(reportChapter.ContentSub)
|
|
|
}
|
|
|
|
|
|
+ // 图表授权token
|
|
|
+ {
|
|
|
+ isOpenChartExpired, e := base_config.CheckIsOpenChartExpired()
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("获取图表是否开启鉴权失败,err:" + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ if isOpenChartExpired {
|
|
|
+ tokenMap := make(map[string]string)
|
|
|
+ reportChapterItem.Content = HandleReportContent(reportChapterItem.Content, "add", tokenMap)
|
|
|
+ reportChapterItem.ContentSub = HandleReportContent(reportChapterItem.ContentSub, "add", tokenMap)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
go AddUserAccessRecord(user, reportInfo.Id, reportInfo.ClassifyNameFirst, reportChapterId, authOk)
|
|
|
reportChapterDetail = new(response.ReportChapterDetail)
|
|
|
reportChapterDetail.ReportChapterItem = reportChapterItem
|