fix: 修复域名管理无法创建tencent-eo dns授权的bug

https://github.com/certd/certd/issues/587
This commit is contained in:
xiaojunnuo
2025-11-26 23:36:34 +08:00
parent e9427b4694
commit 3406bb5a4a
3 changed files with 12 additions and 12 deletions
@@ -184,7 +184,8 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
name: "AccessSelector", name: "AccessSelector",
vModel: "modelValue", vModel: "modelValue",
type: compute(({ form }) => { type: compute(({ form }) => {
return form.dnsProviderType; const type = form.dnsProviderType || "aliyun";
return dnsProviderTypeDict?.dataMap[type]?.accessType;
}), }),
}, },
show: compute(({ form }) => { show: compute(({ form }) => {
@@ -8,7 +8,7 @@ import { LoginService } from "../../../modules/login/service/login-service.js";
*/ */
@Provide() @Provide()
@Controller('/api') @Controller('/api')
export class LoginController extends BaseController { export class ForgotPasswordController extends BaseController {
@Inject() @Inject()
loginService: LoginService; loginService: LoginService;
@Inject() @Inject()
@@ -1,7 +1,7 @@
import { AddonService, BaseController, Constants, newAddon, SysInstallInfo, SysOauthSetting, SysSettingsService } from "@certd/lib-server"; import { BaseController, Constants, SysInstallInfo, SysOauthSetting, SysSettingsService } from "@certd/lib-server";
import { ALL, Body, Controller, Get, Inject, Post, Provide, Query } from "@midwayjs/core"; import { ALL, Body, Controller, Inject, Post, Provide } from "@midwayjs/core";
import { IOauthProvider } from "../../../plugins/plugin-oauth/api.js";
import { AddonGetterService } from "../../../modules/pipeline/service/addon-getter-service.js"; import { AddonGetterService } from "../../../modules/pipeline/service/addon-getter-service.js";
import { IOauthProvider } from "../../../plugins/plugin-oauth/api.js";
/** /**
*/ */
@@ -29,7 +29,7 @@ export class ConnectController extends BaseController {
} }
@Post('/login', { summary: Constants.per.guest }) @Post('/login', { summary: Constants.per.guest })
public async login(@Query(ALL) body: {type:string}) { public async login(@Body(ALL) body: {type:string}) {
const addon = await this.getOauthProvider(body.type); const addon = await this.getOauthProvider(body.type);
const installInfo = await this.sysSettingsService.getSetting<SysInstallInfo>(SysInstallInfo); const installInfo = await this.sysSettingsService.getSetting<SysInstallInfo>(SysInstallInfo);
@@ -40,7 +40,7 @@ export class ConnectController extends BaseController {
return this.ok(loginUrl); return this.ok(loginUrl);
} }
@Post('/callback', { summary: Constants.per.guest }) @Post('/callback', { summary: Constants.per.guest })
public async callback(@Query(ALL) body: any) { public async callback(@Body(ALL) body: any) {
//处理登录回调 //处理登录回调
const addon = await this.getOauthProvider(body.type); const addon = await this.getOauthProvider(body.type);
const tokenRes = await addon.onCallback({ const tokenRes = await addon.onCallback({
@@ -51,16 +51,15 @@ export class ConnectController extends BaseController {
const userInfo = tokenRes.userInfo; const userInfo = tokenRes.userInfo;
const openId = userInfo.openId;
return this.ok(openId);
return this.ok(tokenRes);
} }
@Post('/bind', { summary: Constants.per.guest }) @Post('/bind', { summary: Constants.per.guest })
public async bind(@Body(ALL) body: any) { public async bind(@Body(ALL) body: any) {
const autoRegister = body.autoRegister || false; // const autoRegister = body.autoRegister || false;
const bindInfo = body.bind || {}; // const bindInfo = body.bind || {};
//处理登录回调 //处理登录回调
return this.ok(1); return this.ok(1);
} }