Procházet zdrojové kódy

fix:修复分享页查看研报

zqbao před 1 rokem
rodič
revize
a7d22b9a9a
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. 5 1
      controllers/report.go

+ 5 - 1
controllers/report.go

@@ -28,7 +28,11 @@ func (this *ReportController) Detail() {
 		return
 	}
 	user := this.User
-
+	if user == nil {
+		br.Ret = 408
+		br.Msg = "用户未登录"
+		return
+	}
 	result, err := services.GetReportDetail(reportId, user.UserId)
 	if err != nil {
 		br.Msg = "查询报告详情失败"