Преглед изворни кода

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

xingzai пре 2 година
родитељ
комит
12377a8ec8
1 измењених фајлова са 5 додато и 2 уклоњено
  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