fix(wechat): 注册 OAuth/绑定 API 未注册导致 404

将 WeChatCustomerService 纳入动态 API 映射,暴露 /wechat/oauth/user-info 等 H5 接口。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zzh 2026-07-02 14:51:47 +08:00
parent 76ff60e793
commit 4d93a9b50d
2 changed files with 5 additions and 1 deletions

View File

@ -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]

View File

@ -48,7 +48,8 @@ public class SimpleAdminApiModule : FakeModule
options.ApplicationServices2Controller<SimpleAdminApiModule>(settings =>
{
settings.RootPath = "rbac";
settings.TypePredicate = type => type == typeof(AuthService);
settings.TypePredicate = type =>
type == typeof(AuthService) || type == typeof(WeChatCustomerService);
});
options.ApplicationServices2Controller<FakeRbacApplicationModule>(settings =>
{