Browse Source

no message

xingzai 2 years ago
parent
commit
249c00eccf
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