refactor: 统一userProject查询参数传递逻辑

This commit is contained in:
xiaojunnuo
2026-06-04 00:00:40 +08:00
parent cdb812ef63
commit 2cbacb4338
30 changed files with 158 additions and 134 deletions
@@ -144,20 +144,36 @@ export class AcmeAccountAccess extends BaseAccess {
action: "GenerateAccount",
buttonText: "生成ACME账号",
successMessage: "ACME账号已生成,请保存授权配置",
type:"textarea",
rows:4,
},
col:{span:24},
required: true,
helper: "请生成ACME账号,账号一旦生成不允许修改",
encrypt: true,
mergeScript: `
return {
component: {
disabled: ctx.compute(({form})=> !!form.access?.account)
disabled: ctx.compute(({form})=> !!form.access?.account && !form.access?.editAccount)
}
}
`,
})
account = "";
@AccessInput({
title: "修改ACME账号",
component: {
name: "a-switch",
vModel: "checked",
},
required: false,
helper: "是否开启修改ACME账号,注意,开启后,会影响DNS持久验证记录",
encrypt: false,
})
editAccount = false;
getDirectoryUrl() {
if (this.caType === "custom") {
if (!this.directoryUrl) {
@@ -180,7 +196,7 @@ export class AcmeAccountAccess extends BaseAccess {
throw new Error("该颁发机构需要填写EAB KID和EAB HMAC Key后才能生成账号");
}
const account = await this.createAccountInfo();
return JSON.stringify(account);
return JSON.stringify(account, null, 2);
}
private async createAccountInfo(): Promise<AcmeAccountInfo> {