diff --git a/src/api/jyh/index.ts b/src/api/jyh/index.ts index 8f63a10..54a92d9 100644 --- a/src/api/jyh/index.ts +++ b/src/api/jyh/index.ts @@ -103,9 +103,9 @@ export function getRepairInfo() { url: '/api/v1/repo/repair/info', method: 'POST', data: { - current: 1, - size: 10, - softwareId: 47 + "current": 1, + "size": 10, + "softwareId": 47 } }); } @@ -113,12 +113,12 @@ export function getRepairInfo() { // 获取许可证列表 export function getLicenseList() { return request({ - url: '/api/v1/repo/license/list', - method: 'GET', - params: { - current: 1, - size: 10, - softwareId: 47 + url: '/api/v1/repo/license/info', + method: 'POST', + data: { + "current": 1, + "size": 10, + "softwareId": 47 } }); } @@ -161,6 +161,18 @@ export const dependencyTree = (softwareId: any): Promise => { }) ); }; +// 获取开发者社区信息 +export const communityInfo = (softwareId: any): Promise => { + return reqCatchV2(() => + request({ + url: `/api/v1/repo/community/info`, + method: 'POST', + data: { + softwareId + } + }) + ); +}; // 编辑用户信息(包含订阅默认预警方式) export const userEdit = (data: any): Promise => { diff --git a/src/components/ChartLine/index.vue b/src/components/ChartLine/index.vue index ccccbde..fffa54f 100644 --- a/src/components/ChartLine/index.vue +++ b/src/components/ChartLine/index.vue @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/src/views/Jyh/LicenseInfo/index.vue b/src/views/Jyh/LicenseInfo/index.vue index 4b7a7e1..367fd2a 100644 --- a/src/views/Jyh/LicenseInfo/index.vue +++ b/src/views/Jyh/LicenseInfo/index.vue @@ -4,12 +4,15 @@ + @@ -30,7 +33,7 @@ - + @@ -38,6 +41,8 @@ import { ref } from 'vue'; import SidePanel from '@/components/LicenseInfo/SidePanel.vue'; import { getLicenseList } from '@/api/jyh'; +import NoData from '@/components/NoData/NoData.vue'; +const currentData = ref(null); const pager = ref({ pageIndex: 1, pageSize: 30, @@ -52,7 +57,8 @@ const close = () => { showDetail.value = false; } -const openPanel = () => { +const openPanel = (row) => { + currentData.value = row showDetail.value = true; } @@ -64,7 +70,7 @@ const tableConfig = ref([ sortMethod: null }, { - field: 'licenseType', + field: 'category', header: '许可证种类', sortable: false, sortMethod: null @@ -84,34 +90,41 @@ const tableConfig = ref([ ]) const list = ref([ - { - licenseName: 'Apache License 2.0', - licenseType: '获准的', - affectedComponent: 'org.apache.commons:commons-collections4', - version: '4.4', - }, - { - licenseName: 'Apache License 2.0', - licenseType: '获准的', - affectedComponent: 'org.apache.commons:commons-collections4', - version: '4.4', - }, - { - licenseName: 'Apache License 2.0', - licenseType: '获准的', - affectedComponent: 'org.apache.commons:commons-collections4', - version: '4.4', - }, - { - licenseName: 'Apache License 2.0', - licenseType: '获准的', - affectedComponent: 'org.apache.commons:commons-collections4', - version: '4.4', - } + // { + // licenseName: 'Apache License 2.0', + // licenseType: '获准的', + // affectedComponent: 'org.apache.commons:commons-collections4', + // version: '4.4', + // }, + // { + // licenseName: 'Apache License 2.0', + // licenseType: '获准的', + // affectedComponent: 'org.apache.commons:commons-collections4', + // version: '4.4', + // }, + // { + // licenseName: 'Apache License 2.0', + // licenseType: '获准的', + // affectedComponent: 'org.apache.commons:commons-collections4', + // version: '4.4', + // }, + // { + // licenseName: 'Apache License 2.0', + // licenseType: '获准的', + // affectedComponent: 'org.apache.commons:commons-collections4', + // version: '4.4', + // } ]) const getList = async() => { - const res = await getLicenseList() + const res: any = await getLicenseList(); + if (!res.error) { + console.log(res); + list.value = res.data.data.records; + pager.value.total = res.data.data.records.length; + } else { + list.value = []; + } } getList(); diff --git a/src/views/Jyh/Search/Components/OssQuery.vue b/src/views/Jyh/Search/Components/OssQuery.vue index 8e98386..f5d1754 100644 --- a/src/views/Jyh/Search/Components/OssQuery.vue +++ b/src/views/Jyh/Search/Components/OssQuery.vue @@ -181,7 +181,7 @@ const columns = ref([ { key: 'contributorCountries', label: '贡献者国家/地区分布', visible: false, filterable: false, sortable: false }, { key: 'contributorOrganizations', label: '贡献者组织/公司分布', visible: false, filterable: false, sortable: false }, { key: 'communityHash', label: '社区hash值', visible: false, filterable: false, sortable: false }, - { key: 'copyright', label: 'CopyRight', visible: false, filterable: false, sortable: false }, + { key: 'copyright', label: 'Copyright', visible: false, filterable: false, sortable: false }, { key: 'externalVulnerabilitySource', label: '外部漏洞源的软件名称', visible: false, filterable: true, sortable: false }, { key: 'versionDescription', label: '版本描述', visible: false, filterable: false, sortable: false }, { key: 'compatibilityRisk', label: '兼容性风险描述', visible: false, filterable: false, sortable: false }, diff --git a/src/views/Jyh/Version/Detail/CommunityInfo.vue b/src/views/Jyh/Version/Detail/CommunityInfo.vue index 275ce9e..eaeb3ed 100644 --- a/src/views/Jyh/Version/Detail/CommunityInfo.vue +++ b/src/views/Jyh/Version/Detail/CommunityInfo.vue @@ -5,25 +5,22 @@ 社区名称 - 开发者社区 + {{ infos.communityName }} 官网地址 - https://www.huaweicloud.com + {{ infos.communityWebsite }} 联系方式 - 950808-1 + {{ infos.communityContact }}
社区描述 - 华为开发者社区致力于打造华为开发者专属的官方技术交流平台,帮助开发者探索开发实践、交流心得经验、获悉业界动态、解决开发问题。汇聚华为云社区“华为云”领域博 - 客、问答、视频等精彩内容,形成开发者和技术爱好者交流与分享主阵地。 + {{ infos.communityDescription }}
@@ -32,14 +29,28 @@
贡献者分布

有关Pull Request创建者的公司信息和地区分布(使用公共GitHub信息进行分析)

- +