Commit 9d977657 authored by 黄奎's avatar 黄奎

页面修改

parent 440d91c0
...@@ -98,20 +98,20 @@ namespace Mall.WebApi.Filter ...@@ -98,20 +98,20 @@ namespace Mall.WebApi.Filter
string cachedKey = SecurityHelper.MD5(string.Format("cmd={0}&token={1}", controllerName + "/" + actionName, token)); string cachedKey = SecurityHelper.MD5(string.Format("cmd={0}&token={1}", controllerName + "/" + actionName, token));
try try
{ {
if (UserReidsCache.Exists(cachedKey))//判断表单是否重复提交 //if (UserReidsCache.Exists(cachedKey))//判断表单是否重复提交
{ //{
actionContext.Result = new Microsoft.AspNetCore.Mvc.JsonResult(new ApiResult // actionContext.Result = new Microsoft.AspNetCore.Mvc.JsonResult(new ApiResult
{ // {
resultCode = (int)ResultCode.FormRepeatSubmit, // resultCode = (int)ResultCode.FormRepeatSubmit,
message = "表单重复提交,请稍后再试", // message = "表单重复提交,请稍后再试",
data = null // data = null
}); // });
} //}
else //else
{ //{
//默认2秒钟之内不能重复提交 // //默认2秒钟之内不能重复提交
UserReidsCache.Set(cachedKey, 1, 2); // UserReidsCache.Set(cachedKey, 1, 2);
} //}
} }
catch catch
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment