From ffa424041bd2a3d48537368b659fae7c8ea94093 Mon Sep 17 00:00:00 2001 From: hjhan Date: Thu, 23 Apr 2026 14:08:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(middleware):=20=E4=BF=AE=E5=A4=8D=E4=BB=A4?= =?UTF-8?q?=E7=89=8C=E9=BB=91=E5=90=8D=E5=8D=95=E4=B8=AD=E7=9A=84=E8=AE=BF?= =?UTF-8?q?=E9=97=AE=E6=8E=A7=E5=88=B6=E9=97=AE=E9=A2=98=20-=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=BA=86=20RefreshTokenMiddleware=20=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E5=93=8D=E5=BA=94=E9=80=BB=E8=BE=91=EF=BC=8C=E5=B0=86?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E5=86=99=E5=85=A5=E9=94=99=E8=AF=AF=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E6=94=B9=E4=B8=BA=E9=87=8D=E5=AE=9A=E5=90=91=E5=88=B0?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2=20-=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E4=BA=86=E7=8A=B6=E6=80=81=E7=A0=81=E8=AE=BE=E7=BD=AE=E3=80=81?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E7=B1=BB=E5=9E=8B=E8=AE=BE=E7=BD=AE=E5=92=8C?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=B6=88=E6=81=AF=E5=86=99=E5=85=A5=20-=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E9=87=8D=E5=AE=9A=E5=90=91=E5=88=B0?= =?UTF-8?q?=20/Account/Login=20=E7=9A=84=E5=8A=9F=E8=83=BD=E4=BB=A5?= =?UTF-8?q?=E6=8F=90=E9=AB=98=E7=94=A8=E6=88=B7=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat(menu): 添加资金通知书菜单项并调整顺序 - 在结算管理菜单中新增了资金通知书功能入口 - 将资金通知书菜单项移动到资金审批之后的位置 - 确保菜单结构与权限配置一致 --- YLErpWeb/App_Data/Menus.txt | 4 ++-- YLErpWeb/Middleware/RefreshTokenMiddleware.cs | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/YLErpWeb/App_Data/Menus.txt b/YLErpWeb/App_Data/Menus.txt index 69e6a020..a8aea562 100644 --- a/YLErpWeb/App_Data/Menus.txt +++ b/YLErpWeb/App_Data/Menus.txt @@ -40,13 +40,13 @@ {Name:"成交簿记",Rights:["结算管理-成交簿记"],Url:"swaptrade2/SwapflowList"}, {Name:"资金记录",Rights:["结算管理-出入金维护"],Url:"entryexit/entryexitList"}, {Name:"资金审批",Rights:["结算管理-资金审批页面"],Url:"entryexit/entryexitApproval"}, + {Name:"资金通知书",Rights:["结算管理-资金通知书"],Url:"v3/client/capital-notice"}, {Name:"收盘操作",Rights:["结算管理-收盘操作"],Url:"eod_trade_value/eodExec"}, {Name:"交易确认书",Rights:["结算管理-交易确认书"],Url:"TradeConfirmBook/Index"}, {Name:"交易确认书_期权",Rights:["结算管理-交易确认书-期权"],Url:"TradeConfirmBook/IndexOption"}, {Name:"结算确认书",Rights:["结算管理-结算确认书"],Url:"swaptrade2/tradeEndConfirmList"}, {Name:"每日估值报告",Rights:["结算管理-每日估值报告"],Url:"clientbalance/TradeMarketReport"}, - {Name:"其他报告",Rights:["结算管理-其他报告"],Url:"supervise_report/ExtendReport"}, - {Name:"资金通知书",Rights:["结算管理-资金通知书"],Url:"v3/client/capital-notice"}, + {Name:"其他报告",Rights:["结算管理-其他报告"],Url:"supervise_report/ExtendReport"}, ] }, {Name:"监管报告",Rights:["监管报告"],Icon:"menu-icon iconteleven" diff --git a/YLErpWeb/Middleware/RefreshTokenMiddleware.cs b/YLErpWeb/Middleware/RefreshTokenMiddleware.cs index f148e047..36bfe420 100644 --- a/YLErpWeb/Middleware/RefreshTokenMiddleware.cs +++ b/YLErpWeb/Middleware/RefreshTokenMiddleware.cs @@ -92,9 +92,7 @@ namespace YLErp.Web.Middleware logger.Info($"[中间件] Token在黑名单中,拒绝访问 - JTI: {jti}, Path: {path}"); context.Response.Cookies.Delete("Access-Token"); context.Response.Cookies.Delete("Access-Token-Encrypt"); - context.Response.StatusCode = 401; - context.Response.ContentType = "text/plain; charset=utf-8"; - await context.Response.WriteAsync("Token has expired / Token已失效,请重新登录 (Please go to login page / 请访问登录页面: /Account/Login)"); + context.Response.Redirect("/Account/Login"); return; }