feat: 支持按品牌配置微信登录凭据
CI / Browser smoke (pull_request) Successful in 58s
CI / Static checks (pull_request) Successful in 1m32s
CI / API integration (pull_request) Successful in 1m27s
CI / Production build (pull_request) Successful in 2m7s

This commit is contained in:
que01 committed 2026-10-23 22:07:39 +08:00
1 parent e75c524343
commit d0a0eeea8c
23 files changed
+460 -62

No files matched your search

@@ -80,6 +80,7 @@ export interface BrandMethods {
appId?: string;
apiBaseUrl?: string;
privateKey?: string;
appSecret?: string;
}): Promise<MiniAppReleaseSettings>;
}
+4
View File
@@ -115,6 +115,10 @@ export interface MiniAppReleaseSettings {
build: Record<string, unknown>;
credential: { algorithm: string } | null;
hasStoredCredentials: boolean;
/** 微信登录 AppSecret 是否已加密保存 */
hasStoredAppSecret: boolean;
/** AppID 与 AppSecret 均已配置,小程序 wx.login 可换取 OpenID */
loginConfigured: boolean;
/** 小程序包内编译期写入的请求域名,需与微信后台 request 合法域名一致 */
requestDomain?: string | null;
/** 构建参数缺失时的原因,非空表示当前无法构建上传 */
+3 -1
View File
@@ -186,7 +186,7 @@ test("发布检查与发布操作使用当前品牌的管理接口", async () =>
]);
});
test("小程序上传配置会提交请求地址", async () => {
test("小程序配置会提交请求地址", async () => {
const calls: Array<{ url: string; method?: string; body?: string }> = [];
const client = new ApiClient({
baseUrl: "http://api.test",
@@ -199,6 +199,7 @@ test("小程序上传配置会提交请求地址", async () => {
await client.updateAdminMiniAppSettings({
appId: "wx123",
apiBaseUrl: "https://wechat.example.com/api",
appSecret: "0123456789abcdef0123456789abcdef",
});
assert.deepEqual(calls, [
{
@@ -207,6 +208,7 @@ test("小程序上传配置会提交请求地址", async () => {
body: JSON.stringify({
appId: "wx123",
apiBaseUrl: "https://wechat.example.com/api",
appSecret: "0123456789abcdef0123456789abcdef",
}),
},
]);