From 2da2ac58fdd5937da6ef9fc69de6eecf9332674a Mon Sep 17 00:00:00 2001 From: chenjinsong <523037378@qq.com> Date: Tue, 6 Jun 2023 10:39:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=9E=E4=BD=93=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E9=80=82=E9=85=8D=E6=8E=A5=E5=8F=A3=E5=BE=AE?= =?UTF-8?q?=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/api.js | 2 +- .../entityDetail/EntityDetailBasicInfo.vue | 52 +++++++++---------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/utils/api.js b/src/utils/api.js index b23f72c4..53dea2f8 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -241,7 +241,7 @@ export const api = { openPort: '', basicInfo: BASE_CONFIG.apiVersion + '/entity/detail/basic', tags: BASE_CONFIG.apiVersion + '/entity/detail/kb/intelligence/tag', - informationAggregation: BASE_CONFIG.apiVersion + '/entity/kb/intelligence/list' + informationAggregation: BASE_CONFIG.apiVersion + '/entity/detail/kb/intelligence/list' } } diff --git a/src/views/charts2/charts/entityDetail/EntityDetailBasicInfo.vue b/src/views/charts2/charts/entityDetail/EntityDetailBasicInfo.vue index e29a43e0..eebd6807 100644 --- a/src/views/charts2/charts/entityDetail/EntityDetailBasicInfo.vue +++ b/src/views/charts2/charts/entityDetail/EntityDetailBasicInfo.vue @@ -91,7 +91,7 @@ export default { const res = tagData.data if (res.code === 200) { Object.keys(res.data).forEach(k => { - if (k !== 'userDefinedTags') { + if (k !== 'userDefinedTags' && res.data[k]) { Object.keys(res.data[k]).forEach(k2 => { const find = entityDetailTags[this.entity.entityType].find(t => t.name === k2) if (find) { @@ -112,43 +112,43 @@ export default { if (res.code === 200) { switch (this.entity.entityType) { case 'ip': { - if (res.data.result.asn) { - this.detailCards.find(c => c.name === 'asn').value = res.data.result.asn.asn - this.detailCards.find(c => c.name === 'asOrg').value = res.data.result.asn.organization + if (res.data.asn) { + this.detailCards.find(c => c.name === 'asn').value = res.data.asn.asn + this.detailCards.find(c => c.name === 'asOrg').value = res.data.asn.organization // AS子网接口未返回 } - if (res.data.result.location) { - this.detailCards.find(c => c.name === 'isp').value = res.data.result.location.isp - this.detailCards.find(c => c.name === 'location').value = this.handleLocation(res.data.result.location) + if (res.data.location) { + this.detailCards.find(c => c.name === 'isp').value = res.data.location.isp + this.detailCards.find(c => c.name === 'location').value = this.handleLocation(res.data.location) // DNS PTR接口未返回 } break } case 'domain': { - if (res.data.result.categories) { - this.detailCards.find(c => c.name === 'categoryName').value = res.data.result.categories.categoryName - this.detailCards.find(c => c.name === 'categoryGroup').value = res.data.result.categories.categoryGroup - this.detailCards.find(c => c.name === 'reputationLevel').value = res.data.result.categories.reputationLevel + if (res.data.categories) { + this.detailCards.find(c => c.name === 'categoryName').value = res.data.categories.categoryName + this.detailCards.find(c => c.name === 'categoryGroup').value = res.data.categories.categoryGroup + this.detailCards.find(c => c.name === 'reputationLevel').value = res.data.categories.reputationLevel } - if (res.data.result.whois) { - this.detailCards.find(c => c.name === 'expireDate').value = res.data.result.whois.expireDate - this.detailCards.find(c => c.name === 'registrarName').value = res.data.result.whois.registrarName - this.detailCards.find(c => c.name === 'registrantOrg').value = res.data.result.whois.registrantOrg - this.detailCards.find(c => c.name === 'registrantCountry').value = res.data.result.whois.registrantCountry - this.detailCards.find(c => c.name === 'createDate').value = res.data.result.whois.createDate - this.detailCards.find(c => c.name === 'email').value = res.data.result.whois.email + if (res.data.whois) { + this.detailCards.find(c => c.name === 'expireDate').value = res.data.whois.expireDate + this.detailCards.find(c => c.name === 'registrarName').value = res.data.whois.registrarName + this.detailCards.find(c => c.name === 'registrantOrg').value = res.data.whois.registrantOrg + this.detailCards.find(c => c.name === 'registrantCountry').value = res.data.whois.registrantCountry + this.detailCards.find(c => c.name === 'createDate').value = res.data.whois.createDate + this.detailCards.find(c => c.name === 'email').value = res.data.whois.email } break } case 'app': { - if (res.data.result.categories) { - this.detailCards.find(c => c.name === 'appCategory').value = res.data.result.categories.appCategory - this.detailCards.find(c => c.name === 'appSubcategory').value = res.data.result.categories.appSubcategory - this.detailCards.find(c => c.name === 'appRisk').value = res.data.result.categories.appRisk - this.detailCards.find(c => c.name === 'appTechnology').value = res.data.result.categories.appTechnology - this.detailCards.find(c => c.name === 'appName').value = res.data.result.categories.appName - this.detailCards.find(c => c.name === 'appLongname').value = res.data.result.categories.appLongname - this.detailCards.find(c => c.name === 'appDescription').value = res.data.result.categories.appDescription + if (res.data.categories) { + this.detailCards.find(c => c.name === 'appCategory').value = res.data.categories.appCategory + this.detailCards.find(c => c.name === 'appSubcategory').value = res.data.categories.appSubcategory + this.detailCards.find(c => c.name === 'appRisk').value = res.data.categories.appRisk + this.detailCards.find(c => c.name === 'appTechnology').value = res.data.categories.appTechnology + this.detailCards.find(c => c.name === 'appName').value = res.data.categories.appName + this.detailCards.find(c => c.name === 'appLongname').value = res.data.categories.appLongname + this.detailCards.find(c => c.name === 'appDescription').value = res.data.categories.appDescription } break }