From 8e1d15c22f89a5c63581aaced153e5b63d84d18e Mon Sep 17 00:00:00 2001 From: 18300102974 Date: Thu, 2 Feb 2023 09:14:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BE=8C=E7=AB=AF=E7=B6=B2?= =?UTF-8?q?=E5=9D=80=E7=8D=B2=E5=8F=96=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EuroTran/EasyBL.WEBAPP/ShowEasy/IndexService.cs | 10 ++++++---- EuroTran/WebApp/Controllers/IndexController.cs | 6 ++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/IndexService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/IndexService.cs index 04b51ce..3e9b9b3 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/IndexService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/IndexService.cs @@ -25,7 +25,7 @@ namespace EasyBL.WEBAPP.SYS { //ads Swiper - public HttpResponseMessage Banner(string requestUrl, string Lang) + public HttpResponseMessage Banner(string Lang) { //string sMsg = null; SuccessResponseMessage srm = SugarBase.ExecTran(db => @@ -46,6 +46,7 @@ namespace EasyBL.WEBAPP.SYS } + string requestUrl = Common.ConfigGetValue("", "ida:RedirectUri"); var saTheme = db.Queryable() ////取得所有資料 .Where(x => x.Language == Lang) .ToList(); @@ -75,7 +76,7 @@ namespace EasyBL.WEBAPP.SYS if (hasMatch && !FilePathTotal.Contains(image.Image)) { - FilePathTotal.Add("http://" + requestUrl + "/" + FilePath.FilePath.Replace("\\", "/")); + FilePathTotal.Add(requestUrl + "/" + FilePath.FilePath.Replace("\\", "/")); } } @@ -101,7 +102,7 @@ namespace EasyBL.WEBAPP.SYS /// /// /// - public HttpResponseMessage BaseInfo(string requestUrl,string Lang) + public HttpResponseMessage BaseInfo(string Lang) { SuccessResponseMessage srm = null; string sError = null; @@ -115,6 +116,7 @@ namespace EasyBL.WEBAPP.SYS { Lang = WebAppGlobalConstWord.DEFAULT_LANGUAGE; } + string requestUrl = Common.ConfigGetValue("", "ida:RedirectUri"); var baseInfo = db.Queryable() //搜尋條件 .Where(x => x.OrgID == OrgID && x.Language == Lang) @@ -126,7 +128,7 @@ namespace EasyBL.WEBAPP.SYS .First(); if (saFile != null) { - baseInfo.Image = "http://"+ requestUrl + "/" + saFile.FilePath.Replace("\\","/"); + baseInfo.Image = requestUrl +"/"+ saFile.FilePath.Replace("\\","/"); } } srm = new SuccessResponseMessage(null, null); diff --git a/EuroTran/WebApp/Controllers/IndexController.cs b/EuroTran/WebApp/Controllers/IndexController.cs index 24a3d02..e3ec64d 100644 --- a/EuroTran/WebApp/Controllers/IndexController.cs +++ b/EuroTran/WebApp/Controllers/IndexController.cs @@ -19,8 +19,7 @@ namespace WebApp.Controllers [HttpGet] public HttpResponseMessage Banner(string Lang) { - string requestUrl = this.Request.RequestUri.Authority; - return new IndexService().Banner(requestUrl,Lang); + return new IndexService().Banner(Lang); } /// @@ -31,8 +30,7 @@ namespace WebApp.Controllers [HttpGet] public HttpResponseMessage BaseInfo(string Lang) { - string requestUrl = this.Request.RequestUri.Authority; - return new IndexService().BaseInfo(requestUrl,Lang); + return new IndexService().BaseInfo(Lang); } ///