From d6891792c855c474f0684fe98072698111866149 Mon Sep 17 00:00:00 2001 From: liangkun Date: Tue, 29 Nov 2022 10:51:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9api=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=85=A7=E7=89=87=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Learun.Application.WebApi/Modules/Arrangelesson.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs index 34d3510e2..069d5455d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Arrangelesson.cs @@ -180,7 +180,12 @@ namespace Learun.Application.WebApi.Modules var annfile = annexesFileIbll.GetEntityByFolderId(item.Photo); if (annfile != null && annfile.F_FilePath != null) { - item.Photo = webrootpath + item.Photo.Substring(item.Photo.IndexOf("Resource") - 1); + if (annfile.F_FilePath.IndexOf("Resource") != -1) + { + item.Photo = webrootpath + annfile.F_FilePath.Substring(annfile.F_FilePath.IndexOf("Resource") - 1); + } + else + item.Photo = ""; } else item.Photo = "";