From 4d93a9b50df44aacb8bbea21c3864e0da041c597 Mon Sep 17 00:00:00 2001 From: zzh <1368735060@qq.com> Date: Thu, 2 Jul 2026 14:51:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(wechat):=20=E6=B3=A8=E5=86=8C=20OAuth/?= =?UTF-8?q?=E7=BB=91=E5=AE=9A=20API=20=E6=9C=AA=E6=B3=A8=E5=86=8C=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=20404?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 WeChatCustomerService 纳入动态 API 映射,暴露 /wechat/oauth/user-info 等 H5 接口。 Co-authored-by: Cursor --- .../WeChatRouteIntegrationTests.cs | 3 +++ src/SimpleAdmin.Api/SimpleAdminApiModule.cs | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/SimpleAdmin.Api.IntegrationTests/WeChatRouteIntegrationTests.cs b/src/SimpleAdmin.Api.IntegrationTests/WeChatRouteIntegrationTests.cs index 2564cf3..96c6611 100644 --- a/src/SimpleAdmin.Api.IntegrationTests/WeChatRouteIntegrationTests.cs +++ b/src/SimpleAdmin.Api.IntegrationTests/WeChatRouteIntegrationTests.cs @@ -23,6 +23,9 @@ public class WeChatRouteIntegrationTests host.RoutePatterns.Should().Contain("apiwechat/verification"); host.RoutePatterns.Should().Contain("wechat/mp/{appId}"); host.RoutePatterns.Should().Contain("wechat/mp/login-qrcode"); + host.RoutePatterns.Should().Contain("wechat/oauth/user-info"); + host.RoutePatterns.Should().Contain("wechat/customer/register"); + host.RoutePatterns.Should().Contain("wechat/customer/bind"); } [Fact] diff --git a/src/SimpleAdmin.Api/SimpleAdminApiModule.cs b/src/SimpleAdmin.Api/SimpleAdminApiModule.cs index 3bff776..61ca28e 100644 --- a/src/SimpleAdmin.Api/SimpleAdminApiModule.cs +++ b/src/SimpleAdmin.Api/SimpleAdminApiModule.cs @@ -48,7 +48,8 @@ public class SimpleAdminApiModule : FakeModule options.ApplicationServices2Controller(settings => { settings.RootPath = "rbac"; - settings.TypePredicate = type => type == typeof(AuthService); + settings.TypePredicate = type => + type == typeof(AuthService) || type == typeof(WeChatCustomerService); }); options.ApplicationServices2Controller(settings => {