浏览代码

no message

xingzai 2 年之前
父节点
当前提交
249c00eccf
共有 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