diff --git a/CoreCms.Net.Filter/GlobalExceptionsFilterForAdmin.cs b/CoreCms.Net.Filter/GlobalExceptionsFilterForAdmin.cs
index 9164340..f992cf5 100644
--- a/CoreCms.Net.Filter/GlobalExceptionsFilterForAdmin.cs
+++ b/CoreCms.Net.Filter/GlobalExceptionsFilterForAdmin.cs
@@ -43,7 +43,7 @@ namespace CoreCms.Net.Filter
//处理各种异常
var jm = new AdminUiCallBack();
jm.code = (int)status;
- jm.msg = "发生了全局异常请联系管理员";
+ jm.msg = "系统异常,请查看错误描述并进行解决。";
jm.data = context.Exception;
context.ExceptionHandled = true;
context.Result = new ObjectResult(jm);
diff --git a/CoreCms.Net.Filter/GlobalExceptionsFilterForClent.cs b/CoreCms.Net.Filter/GlobalExceptionsFilterForClent.cs
index 87b8f9a..0ff643a 100644
--- a/CoreCms.Net.Filter/GlobalExceptionsFilterForClent.cs
+++ b/CoreCms.Net.Filter/GlobalExceptionsFilterForClent.cs
@@ -46,7 +46,7 @@ namespace CoreCms.Net.Filter
{
status = false,
code = (int)status,
- msg = "发生了全局异常,请联系管理员",
+ msg = "系统返回异常,请联系管理员进行处理!",
data = context.Exception
};
context.ExceptionHandled = true;
diff --git a/CoreCms.Net.Loging/NLogUtil.cs b/CoreCms.Net.Loging/NLogUtil.cs
index a31fbee..c46e4b5 100644
--- a/CoreCms.Net.Loging/NLogUtil.cs
+++ b/CoreCms.Net.Loging/NLogUtil.cs
@@ -65,8 +65,10 @@ namespace CoreCms.Net.Loging
/// 异常
public static void WriteAll(LogLevel logLevel, LogType logType, string logTitle, string message, Exception exception = null)
{
- WriteDbLog(logLevel, logType, logTitle, message, exception);
+ //先存文件
WriteFileLog(logLevel, logType, logTitle, message, exception);
+ //后存数据库
+ WriteDbLog(logLevel, logType, logTitle, message, exception);
}
///
diff --git a/CoreCms.Net.Web.Admin/Controllers/Com/DemoController.cs b/CoreCms.Net.Web.Admin/Controllers/Com/DemoController.cs
index 3944b8c..bf01218 100644
--- a/CoreCms.Net.Web.Admin/Controllers/Com/DemoController.cs
+++ b/CoreCms.Net.Web.Admin/Controllers/Com/DemoController.cs
@@ -15,9 +15,11 @@ using CoreCms.Net.Caching.AutoMate.RedisCache;
using CoreCms.Net.IServices;
using CoreCms.Net.Model.ViewModels.UI;
using CoreCms.Net.Utility.Helper;
+using Essensoft.Paylink.WeChatPay;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.FileProviders;
+using Microsoft.Extensions.Options;
using ToolGood.Words;
namespace CoreCms.Net.Web.Admin.Controllers
@@ -28,11 +30,11 @@ namespace CoreCms.Net.Web.Admin.Controllers
//[DisableCors]
public class DemoController : Controller
{
- private readonly IToolsServices _toolsServices;
+ private readonly IOptions _optionsAccessor;
- public DemoController(IToolsServices toolsServices)
+ public DemoController(IOptions optionsAccessor)
{
- _toolsServices = toolsServices;
+ _optionsAccessor = optionsAccessor;
}
@@ -40,12 +42,12 @@ namespace CoreCms.Net.Web.Admin.Controllers
/// 默认首页
///
///
- public async Task Index()
+ public IActionResult Index()
{
- var t = await _toolsServices.IllegalWordsReplace("测试");
+ var outData = _optionsAccessor.Value;
//return Content(t);
- return Content(t.ToString());
+ return Json(outData);
}
}
}
diff --git a/CoreCms.Net.Web.WebApi/Controllers/PayNotify/WeChatPayController.cs b/CoreCms.Net.Web.WebApi/Controllers/PayNotify/WeChatPayController.cs
index bf417a3..7f6ca06 100644
--- a/CoreCms.Net.Web.WebApi/Controllers/PayNotify/WeChatPayController.cs
+++ b/CoreCms.Net.Web.WebApi/Controllers/PayNotify/WeChatPayController.cs
@@ -35,7 +35,7 @@ namespace CoreCms.Net.Web.WebApi.Controllers.PayNotify
private readonly ICoreCmsBillRefundServices _billRefundServices;
private readonly IWeChatPayNotifyClient _client;
private readonly IOptions _optionsAccessor;
- private IRedisOperationRepository _redisOperationRepository;
+ private readonly IRedisOperationRepository _redisOperationRepository;
///
/// 构造函数
///