From 32cdb6ced343612d3557f153fc5a9b6021a2ba7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Fri, 9 Jan 2026 00:26:06 +0800 Subject: [PATCH] cont. --- src/common/UrlTool.js | 2 +- src/common/util/ShareUtil.js | 2 +- src/factory/components/News/index.jsx | 6 ++-- src/factory/components/Resource/index.jsx | 2 +- src/factory/news/index.jsx | 4 ++- src/factory/resource/commonTools/index.jsx | 3 +- src/factory/resource/commonTools/index.scss | 7 +++++ .../resource/softwareProject/index.jsx | 8 ++++-- .../resource/softwareProject/index.scss | 28 ++++++++++++++++--- src/forge/Branch/CloneAddress.js | 2 +- src/forge/Head/Header.js | 2 +- src/forge/Information/fetch.js | 2 +- .../Main/projecthome/v2/components/banner.jsx | 4 +-- src/forge/Team/fetch.js | 2 +- src/services/project.js | 2 +- 15 files changed, 55 insertions(+), 21 deletions(-) diff --git a/src/common/UrlTool.js b/src/common/UrlTool.js index 031c324db..8ee87d0ce 100644 --- a/src/common/UrlTool.js +++ b/src/common/UrlTool.js @@ -136,7 +136,7 @@ export function getZoneUrl(path) { let settings = localStorage.chromesetting&&JSON.parse(localStorage.chromesetting); let actionUrl = settings && settings.common.zone; - return `${actionUrl}${path?path:''}` + return `${actionUrl}/zoneAdmin${path?path:''}` } export function getUrlmys(path, goTest) { diff --git a/src/common/util/ShareUtil.js b/src/common/util/ShareUtil.js index faf93950d..3ab9f146d 100644 --- a/src/common/util/ShareUtil.js +++ b/src/common/util/ShareUtil.js @@ -4,7 +4,7 @@ const wx = window.wx const appId = 'wxf8debe756b4a0309' let settings = localStorage && localStorage.chromesetting && localStorage.chromesetting !== "undefined" && JSON.parse(localStorage.chromesetting); -let actionUrl = settings && settings.common.zone +'/api'; +let actionUrl = settings && settings.common.zone +'/zoneAdmin/api'; const service = axios.create({ baseURL: actionUrl, diff --git a/src/factory/components/News/index.jsx b/src/factory/components/News/index.jsx index 3eaa9e135..f36253633 100644 --- a/src/factory/components/News/index.jsx +++ b/src/factory/components/News/index.jsx @@ -44,7 +44,9 @@ function News(props) { const getTopList = () => { gethomePageDocList(factoryZoneId).then(res => { - setMainList(res.data.rows) + if (res && res.data && res.data.rows) { + setMainList(res.data.rows) + } }) } @@ -59,7 +61,7 @@ function News(props) { const getHotList = () => { getNewsHotList(factoryZoneId, { pageSize: 1, pageNum: 1 }).then(res => { - if (res.data.rows && res.data.rows.length > 0) { + if (res && res.data.rows && res.data.rows.length > 0) { setNews(res.data.rows[0]) } }) diff --git a/src/factory/components/Resource/index.jsx b/src/factory/components/Resource/index.jsx index cdc313c04..8819dc159 100644 --- a/src/factory/components/Resource/index.jsx +++ b/src/factory/components/Resource/index.jsx @@ -12,7 +12,7 @@ import '../../common.scss' gsap.registerPlugin(ScrollTrigger); const resourceInfo = [ - { name: '项目', title: '工厂开源项目', icon: 'icon-xiangmu', desc: '标准化生产线核心代码及软件工厂开发工具源码', path: '/sf/resources/project' }, + { name: '项目', title: '工厂开源项目', icon: 'icon-xiangmu', desc: '基于标准化生产线开发的项目源码、依赖包源码、标准化生产线源码等', path: '/sf/resources/project' }, { name: '版本', title: '生产线安装包', icon: 'icon-banben', desc: '标准化生产线快速迭代版本和稳定支持版本', path: '/sf/resources/releases' }, { name: '工具', title: '共建共用工具', icon: 'icon-gongju', desc: '由菌工集团、科研院所、地方企业等提供,可免费共用的工具', path: '/sf/resources/commontools' }, { name: '软件', title: '开源社区软件', icon: 'icon-gongju', desc: '来自开源社区,可按授权许可使用和复用的各类软件', path: '/sf/resources/devtools' }, diff --git a/src/factory/news/index.jsx b/src/factory/news/index.jsx index aa7144992..2481c6217 100644 --- a/src/factory/news/index.jsx +++ b/src/factory/news/index.jsx @@ -65,7 +65,9 @@ function Index(props) { const getHotList = () => { getNewsHotList(factoryZoneId, { pageSize: 2, pageNum: 1 }).then(res => { - setHotList(res.data.rows) + if (res && res.data && res.data.rows) { + setHotList(res.data.rows) + } }) } diff --git a/src/factory/resource/commonTools/index.jsx b/src/factory/resource/commonTools/index.jsx index 74c08ae87..8e11e730c 100644 --- a/src/factory/resource/commonTools/index.jsx +++ b/src/factory/resource/commonTools/index.jsx @@ -97,7 +97,8 @@ function Index(props) {
{item.name}
- 共建方
{item.extendDataSharer} + 共建方
+ {item.extendDataSharer}
{item.summary} diff --git a/src/factory/resource/commonTools/index.scss b/src/factory/resource/commonTools/index.scss index c78c237ce..e55a8a190 100644 --- a/src/factory/resource/commonTools/index.scss +++ b/src/factory/resource/commonTools/index.scss @@ -103,6 +103,13 @@ color: #091221; font-size: 13px; + span { + max-width: 330px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + } + img { width: 15px; margin-right: 5px; diff --git a/src/factory/resource/softwareProject/index.jsx b/src/factory/resource/softwareProject/index.jsx index c8a9b0d5b..edadfe6a7 100644 --- a/src/factory/resource/softwareProject/index.jsx +++ b/src/factory/resource/softwareProject/index.jsx @@ -66,7 +66,7 @@ function Index(props) {
-

标准化生产线核心代码及软件工厂开发工具源码

+

基于标准化生产线开发的项目源码、依赖包源码、标准化生产线源码等

{ contentList.map((item, index) => { @@ -90,7 +90,8 @@ function Index(props) { }) } */} - 共建方
{project.name.split('/')[0]} + 共建方
+ {project.name.split('/')[0]}
{project.description} @@ -140,7 +141,8 @@ function Index(props) { }) } */} - 共建方
{project.name.split('/')[0]} + 共建方
+ {project.name.split('/')[0]}
diff --git a/src/factory/resource/softwareProject/index.scss b/src/factory/resource/softwareProject/index.scss index 8f5828172..8f3f6115a 100644 --- a/src/factory/resource/softwareProject/index.scss +++ b/src/factory/resource/softwareProject/index.scss @@ -164,8 +164,8 @@ } &-content { - background: linear-gradient(180deg,#f4f8fd6c 0%,#f4f8fd6c 80.62%,#f4f8fd 100%), #ffffff; - border-radius:80px 80px 0px 0px; + background: linear-gradient(180deg, #f4f8fd6c 0%, #f4f8fd6c 80.62%, #f4f8fd 100%), #ffffff; + border-radius: 80px 80px 0px 0px; padding-top: 28px; display: flex; flex-direction: column; @@ -330,6 +330,13 @@ color: #091221; font-size: 13px; + span { + max-width: 200px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + } + img { width: 15px; margin-right: 5px; @@ -349,19 +356,25 @@ margin-right: 32px; } - &:nth-child(1), &:nth-child(4) { + &:nth-child(1), + &:nth-child(4) { color: #ffffff; - h5, div { + + h5, + div { color: #ffffff; } + .item-data { span { color: #ffffff; + &:after { color: #ffffff; } } } + .item-tags { height: 32px; background: rgba(179, 190, 252, 0.18); @@ -453,6 +466,13 @@ color: #091221; font-size: 13px; + span { + max-width: 200px; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + } + img { width: 15px; margin-right: 5px; diff --git a/src/forge/Branch/CloneAddress.js b/src/forge/Branch/CloneAddress.js index f2ee94bea..fc99ed2bb 100644 --- a/src/forge/Branch/CloneAddress.js +++ b/src/forge/Branch/CloneAddress.js @@ -17,7 +17,7 @@ function CloneAddress({ http_url, ssh_url, zip_url, tar_url }) { if (match && match[1]) { const path = match[1]; - setCloneUrl(`${window.location.hostname}:3000/${path}`); + setCloneUrl(`${ window.location.protocol }//${window.location.hostname}:3000/${path}`); } else { setCloneUrl(http_url); } diff --git a/src/forge/Head/Header.js b/src/forge/Head/Header.js index d77fc928c..77889865f 100644 --- a/src/forge/Head/Header.js +++ b/src/forge/Head/Header.js @@ -78,7 +78,7 @@ class NewHeader extends Component { } window._header_componentHandler = this; - this.getZoneList(settings && settings.common.zone +'/api') + this.getZoneList(settings && settings.common.zone +'/zoneAdmin/api') try { window.sessionStorage.setItem("yslgeturls", JSON.stringify(window.location.href)) diff --git a/src/forge/Information/fetch.js b/src/forge/Information/fetch.js index b8314f50e..64fe63a70 100644 --- a/src/forge/Information/fetch.js +++ b/src/forge/Information/fetch.js @@ -49,7 +49,7 @@ function beforeFetch(actionUrl){ return service; } let settings = localStorage.chromesetting&& localStorage.chromesetting !=="undefined"&& JSON.parse(localStorage.chromesetting); -let actionUrl = settings && settings.common.zone +'/api'; +let actionUrl = settings && settings.common.zone +'/zoneAdmin/api'; const service = beforeFetch(actionUrl); export const httpUrl = actionUrl; diff --git a/src/forge/Main/projecthome/v2/components/banner.jsx b/src/forge/Main/projecthome/v2/components/banner.jsx index 1dfe071bc..5ee47f12a 100644 --- a/src/forge/Main/projecthome/v2/components/banner.jsx +++ b/src/forge/Main/projecthome/v2/components/banner.jsx @@ -155,7 +155,7 @@ function Banner({isVisible}) { {/* 底部统计数据 */}
-
24
+
35
开源项目
@@ -165,7 +165,7 @@ function Banner({isVisible}) {
-
99
+
20000+
已治理组件
diff --git a/src/forge/Team/fetch.js b/src/forge/Team/fetch.js index e6651edc9..3a21a9383 100644 --- a/src/forge/Team/fetch.js +++ b/src/forge/Team/fetch.js @@ -56,7 +56,7 @@ function beforeFetch(actionUrl){ return service; } let settings = localStorage.chromesetting&& localStorage.chromesetting !=="undefined"&& JSON.parse(localStorage.chromesetting); -let actionUrl = settings && settings.common.zone +'/api'; +let actionUrl = settings && settings.common.zone +'/zoneAdmin/api'; const service = beforeFetch(actionUrl); export const httpUrl = actionUrl; diff --git a/src/services/project.js b/src/services/project.js index ea2f62e5a..22a7b60fd 100644 --- a/src/services/project.js +++ b/src/services/project.js @@ -6,7 +6,7 @@ let baseZoneUrl = `${zoneUrl}/api` if (__CLIENT__ ) { let settings = localStorage.chromesetting && localStorage.chromesetting !== 'undefined' &&JSON.parse(localStorage.chromesetting); baseUrl = settings && settings.common && settings.common.main_site_url ? `${settings.common.main_site_url}/api` : baseUrl; - baseZoneUrl = settings ? `${settings && settings.common.zone}/api` : `${zoneUrl}/api`; + baseZoneUrl = settings ? `${settings && settings.common.zone}/zoneAdmin/api` : `${zoneUrl}/api`; } console.log("__CLIENT__",__CLIENT__,baseUrl);