mirror of
https://github.com/certd/certd.git
synced 2026-04-23 11:37:23 +08:00
chore: 新网dns完善
This commit is contained in:
@@ -36,3 +36,4 @@ export * from './plugin-apisix/index.js'
|
||||
export * from './plugin-dokploy/index.js'
|
||||
export * from './plugin-godaddy/index.js'
|
||||
export * from './plugin-captcha/index.js'
|
||||
export * from './plugin-xinnet/index.js'
|
||||
|
||||
@@ -1,29 +1,67 @@
|
||||
import { IsAccess, AccessInput, BaseAccess } from '@certd/pipeline';
|
||||
import { IsAccess, AccessInput, BaseAccess } from "@certd/pipeline";
|
||||
import { XinnetClient } from "@certd/plugin-plus";
|
||||
|
||||
/**
|
||||
* 这个注解将注册一个授权配置
|
||||
* 在certd的后台管理系统中,用户可以选择添加此类型的授权
|
||||
*/
|
||||
@IsAccess({
|
||||
name: 'xinnet',
|
||||
title: '新网授权',
|
||||
icon: 'arcticons:dns-changer-3',
|
||||
desc: '',
|
||||
name: "xinnet",
|
||||
title: "新网授权",
|
||||
icon: "arcticons:dns-changer-3",
|
||||
desc: ""
|
||||
})
|
||||
export class XinnetAccess extends BaseAccess {
|
||||
|
||||
/**
|
||||
* 授权属性配置
|
||||
*/
|
||||
@AccessInput({
|
||||
title: '域名登录密码',
|
||||
title: "用户名",
|
||||
component: {
|
||||
name:"a-input-password",
|
||||
vModel:"value",
|
||||
placeholder: '域名密码',
|
||||
placeholder: "手机号"
|
||||
},
|
||||
helper:"您可以在此处[重置域名管理密码](https://domain.xinnet.com/#domain/manage/domain_manage_pwd)",
|
||||
required: true,
|
||||
encrypt: true,
|
||||
encrypt: true
|
||||
})
|
||||
password = '';
|
||||
username = "";
|
||||
|
||||
@AccessInput({
|
||||
title: "域名登录密码",
|
||||
component: {
|
||||
name: "a-input-password",
|
||||
vModel: "value",
|
||||
placeholder: "域名密码"
|
||||
},
|
||||
helper: "您可以在此处[重置域名管理密码](https://domain.xinnet.com/#domain/manage/domain_manage_pwd)",
|
||||
required: true,
|
||||
encrypt: true
|
||||
})
|
||||
password = "";
|
||||
|
||||
@AccessInput({
|
||||
title: "测试",
|
||||
component: {
|
||||
name: "api-test",
|
||||
action: "TestRequest"
|
||||
},
|
||||
helper: "点击测试接口是否正常"
|
||||
})
|
||||
testRequest = true;
|
||||
|
||||
async onTestRequest() {
|
||||
|
||||
const client = new XinnetClient({
|
||||
access: this,
|
||||
logger: this.ctx.logger,
|
||||
http: this.ctx.http
|
||||
});
|
||||
|
||||
await client.getDomainList({ pageNo: 1, pageSize: 1 });
|
||||
|
||||
return "ok";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
new XinnetAccess();
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
export * from './dns-provider.js';
|
||||
export * from './access.js';
|
||||
export * from './client.js';
|
||||
|
||||
Reference in New Issue
Block a user