Compare commits

...

2 Commits

Author SHA1 Message Date
xiaojunnuo e7e54bc19e perf: 新网互联支持查询域名列表 2026-02-11 16:27:54 +08:00
xiaojunnuo 9fb980599f fix: 修复任务步骤标题过长导致错位的问题 2026-02-11 15:51:50 +08:00
3 changed files with 55 additions and 8 deletions
@@ -37,7 +37,7 @@
<div class="step-row">
<div class="text">
<fs-icon icon="ion:flash"></fs-icon>
<h4 class="title" :class="{ disabled: element.disabled, deleted: element.disabled }">{{ element.title }}</h4>
<h4 class="title" :class="{ disabled: element.disabled, deleted: element.disabled }" :title="element.title">{{ element.title }}</h4>
</div>
<div class="action">
<a key="edit" @click="stepEdit(currentTask, element, index)">编辑</a>
@@ -306,6 +306,9 @@ export default {
justify-content: space-between;
.text {
display: flex;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
> * {
margin: 0px;
margin-right: 15px;
@@ -314,9 +317,16 @@ export default {
.action {
display: flex;
align-items: center;
flex-wrap: nowrap;
word-wrap: nowrap;
margin-left: 10px;
> * {
margin-right: 10px;
font-size: 14px;
display: flex;
align-items: center;
flex-wrap: nowrap;
white-space: nowrap;
}
}
}
@@ -1,8 +1,8 @@
import { IsAccess, AccessInput, BaseAccess } from '@certd/pipeline';
import { AccessInput, BaseAccess, IsAccess, PageSearch } from '@certd/pipeline';
/**
* 这个注解将注册一个授权配置
* 在certd的后台管理系统中,用户可以选择添加此类型的授权
管理页面地址:https://www.dns.com.cn/login/toLogin.do
是否有API接口,接口地址:https://api.bizcn.com/rrpservices
*/
@IsAccess({
name: 'xinnetconnect',
@@ -38,6 +38,23 @@ export class XinnetConnectAccess extends BaseAccess {
password = '';
async getDomainList(req: PageSearch): Promise<any> {
let bodyXml =`
<limit>${req.pageSize}</limit>
<offset>${req.pageNo}</offset>
`
if(req.searchKey){
bodyXml += `<domainname>${req.searchKey}</domainname>`
}
const res = await this.doRequest({
url: "/domainService",
bodyXml: bodyXml,
service: "getDomainList",
})
return res
}
async addDnsRecord(req: {domain:string,hostRecord:string, value:string, type:string}): Promise<any> {
const { domain,hostRecord, value, type } = req;
@@ -125,15 +142,19 @@ export class XinnetConnectAccess extends BaseAccess {
// 提取返回结果
const soapBody = result['soap:Envelope']['soap:Body'];
const addDnsRecordResponse = soapBody["ns1:addDnsRecordResponse"];
console.log(addDnsRecordResponse)
const keys = Object.keys(soapBody);
if (keys.length === 0) {
throw new Error('SOAP响应体为空');
}
const addDnsRecordResponse = soapBody[keys[0]];
this.ctx.logger.info(addDnsRecordResponse)
const resultData = addDnsRecordResponse.response.result;
const res = {
code: resultData.$.code,
msg: resultData.msg
}
console.log('操作结果:', res);
this.ctx.logger.info('操作结果:', res);
if (res.code != "200") {
throw new Error(res.msg + " code:" + res.code);
@@ -1,4 +1,5 @@
import { AbstractDnsProvider, CreateRecordOptions, IsDnsProvider, RemoveRecordOptions } from "@certd/plugin-cert";
import { PageRes, PageSearch } from "@certd/pipeline";
import { AbstractDnsProvider, CreateRecordOptions, DomainRecord, IsDnsProvider, RemoveRecordOptions } from "@certd/plugin-cert";
import { XinnetConnectAccess } from "./access.js";
@@ -62,6 +63,21 @@ export class XinnetConnectDnsProvider extends AbstractDnsProvider<XinnetConnectR
await this.access.delDnsRecord(record)
this.logger.info(`删除域名解析成功:fullRecord=${fullRecord}`);
}
async getDomainListPage(req: PageSearch): Promise<PageRes<DomainRecord>> {
const res = await this.access.getDomainList(req)
let list = res.domainlist || []
list = list.map(item => ({
domain: item.domain,
id: item.domain,
}))
return {
pageNo: req.pageNo,
pageSize: req.pageSize,
total: res.total || 0,
list,
}
}
}
//实例化这个provider,将其自动注册到系统中