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); } ///