Browse Source

Merge branch 'cygx_fix_need_20220920_art_pulishdate' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

xingzai 2 years ago
parent
commit
12377a8ec8
1 changed files with 5 additions and 2 deletions
  1. 5 2
      controllers/article.go

+ 5 - 2
controllers/article.go

@@ -349,8 +349,11 @@ Loop:
 		//	detail.IsShowLinkButton = articleTYpeDetail.IsShowLinkButton
 		//}
 		detail.PublishDate = utils.TimeRemoveHms2(detail.PublishDate)
-		chartUserTokenByMobile, _ := services.GetUserTokenByMobile(user.Mobile)
-		detail.ReportLink += "?token=" + chartUserTokenByMobile
+		if detail.ReportLink != "" {
+			chartUserTokenByMobile, _ := services.GetUserTokenByMobile(user.Mobile)
+			detail.ReportLink += "?token=" + chartUserTokenByMobile
+		}
+
 	}
 	resp := new(models.ArticleDetailResp)
 	resp.HasPermission = hasPermission