mirror of
https://github.com/certd/certd.git
synced 2026-05-18 22:57:31 +08:00
fix: 修复京东云域名申请证书报错的bug
This commit is contained in:
@@ -34,8 +34,14 @@ export class JDCloudDnsProvider extends AbstractDnsProvider {
|
|||||||
if (!domainRes.result?.dataList?.length) {
|
if (!domainRes.result?.dataList?.length) {
|
||||||
throw new Error(`域名${domain}在此京东云账号中不存在`)
|
throw new Error(`域名${domain}在此京东云账号中不存在`)
|
||||||
}
|
}
|
||||||
|
const list = domainRes.result.dataList
|
||||||
|
|
||||||
const domainId = domainRes.result.dataList[0].id
|
const found = list.find((item) => item.domainName === domain)
|
||||||
|
if (!found){
|
||||||
|
throw new Error(`域名${domain}在此京东云账号中不存在`)
|
||||||
|
}
|
||||||
|
|
||||||
|
const domainId = found.id
|
||||||
this.logger.info("域名ID:", domainId)
|
this.logger.info("域名ID:", domainId)
|
||||||
/**
|
/**
|
||||||
* hostRecord String True 主机记录
|
* hostRecord String True 主机记录
|
||||||
@@ -55,11 +61,12 @@ export class JDCloudDnsProvider extends AbstractDnsProvider {
|
|||||||
hostRecord: hostRecord,
|
hostRecord: hostRecord,
|
||||||
hostValue: value,
|
hostValue: value,
|
||||||
type: type,
|
type: type,
|
||||||
ttl: 100,
|
ttl: 200,
|
||||||
|
viewValue:-1,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return {
|
return {
|
||||||
recordId: res.result.dataList[0].id,
|
recordId: res.result.dataList.id,
|
||||||
domainId: domainId
|
domainId: domainId
|
||||||
};
|
};
|
||||||
}catch (e) {
|
}catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user