更新驱动

This commit is contained in:
2018-07-06 16:32:13 +08:00
parent 510b0d36c8
commit f5a9db027b
5 changed files with 14 additions and 10 deletions
+1 -3
View File
@@ -16,12 +16,10 @@
<PackageReference Include="ZKWeb.System.Drawing" Version="4.0.1" />
</ItemGroup>
<ItemGroup>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\COMCMS.Common\COMCMS.Common.csproj" />
<ProjectReference Include="..\COMCMS.Core\COMCMS.Core.csproj" />
<ProjectReference Include="..\Lib.Core\Lib.Core.csproj" />
</ItemGroup>
<ItemGroup>
@@ -16,7 +16,7 @@ namespace COMCMS.Web.Common
{
context.HttpContext.Request.ContentType = "application/json";
context.HttpContext.Request.Headers["Accept"] = "application/json";
ReJSON model = new ReJSON(5001, "执行错误:" + context.Exception.Message);
ReJson model = new ReJson(5001, "执行错误:" + context.Exception.Message);
context.Result = new JsonResult(model);
base.OnException(context);
}
@@ -15,8 +15,8 @@ namespace COMCMS.Web.ExceptionHandler
{
string message = exception.Message;
ReJSON error = new ReJSON(message);
ReJson error = new ReJson(message);
context.Response.ContentType = "text/json";
await context.Response.WriteAsync(error.ToJson());
}
}
+3 -3
View File
@@ -41,7 +41,7 @@ namespace COMCMS.Web.Filter
}
}
private ReJSON ValiSignature(HttpContext context)
private ReJson ValiSignature(HttpContext context)
{
var Request = context.Request;
@@ -77,7 +77,7 @@ namespace COMCMS.Web.Filter
if (!MySign.CheckSign(pars, signature))
{
return new ReJSON(40004, "signature 错误!");
return new ReJson(40004, "signature 错误!");
}
//判断是否超时
string timeStamp = pars["timeStamp"];
@@ -85,7 +85,7 @@ namespace COMCMS.Web.Filter
DateTime postTime = Utils.StampToDateTime(timeStamp);
if (postTime < DateTime.Now.AddSeconds(-120))//30秒有效期
{
return new ReJSON(40004, "signature 错误!", 1);
return new ReJson(40004, "signature 错误!", 1);
}
return null;