武汉项目结合版01

This commit is contained in:
谢思 2025-12-27 17:02:59 +08:00
parent 42032382aa
commit 34b3b0a12d
18 changed files with 139 additions and 45 deletions

View File

@ -55,7 +55,7 @@
"express": "^4.18.2",
"flv.js": "^1.5.0",
"fs-extra": "3.0.1",
"gsap": "^3.13.0",
"gsap": "^3.14.2",
"http-proxy-middleware": "^2.0.6",
"i18next": "^23.4.5",
"immutability-helper": "^2.6.6",
@ -179,7 +179,7 @@
"<rootDir>/src/**/?(*.)(spec|test).{js,jsx,mjs}"
],
"testEnvironment": "node",
"testURL": "http://localhost",
"testURL": "https://testforgeplus.trustie.net",
"transform": {
"^.+\\.(js|jsx|mjs)$": "<rootDir>/node_modules/babel-jest",
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
@ -204,7 +204,7 @@
"eslintConfig": {
"extends": "react-app"
},
"proxy": "http://172.20.32.203:4000/",
"proxy": "https://testforgeplus.trustie.net/",
"port": "3007",
"devDependencies": {
"@babel/core": "^7.23.6",

View File

@ -150,7 +150,7 @@ const Home = Loadable({
})
const Store = Loadable({
loader: () => import('./forge/Main/projectHomeNew/v2'),
loader: () => import('./forge/Main/projecthome/Index'),
loading: Loading,
})
@ -227,7 +227,7 @@ const News = Loadable({
});
// 此处仅维护前端可能的一级路由,不用进行项目或者组织判断的字段。
const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder", "glcc","bindlogin", "softbot","zone", "hiagent","softwareFactory", "development", "governance", "forums", "news"];
const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder", "glcc","bindlogin", "softbot","zone", "hiagent","softwareFactory", "development", "governance", "forums", "news", "exploreStore", "factory"];
class App extends Component {
constructor(props) {
@ -650,6 +650,12 @@ class App extends Component {
}
}>
</Route>
<Route
path="/exploreStore"
render={(props) => (
<Projects {...this.props} {...props} />
)}
></Route>
<Route exact path="/explore"
render={
(props) => (
@ -657,6 +663,12 @@ class App extends Component {
)
}
/>
<Route
path="/eco"
render={(props) => (
<Store {...this.props} {...props} />
)}
></Route>
<Route
path={"/governance"}
render={
@ -666,6 +678,15 @@ class App extends Component {
}>
</Route>
<Route
path={"/factory"}
render={
(props) => {
return (<Home {...this.props} {...props} {...this.state} />)
}
}>
</Route>
{/* 判断为用户/组织,并进入对应页面 */}
{
pathType === 'User' ?

View File

@ -249,6 +249,7 @@
&-video {
margin-top: 83px;
display: none;
video {
opacity: 0;

View File

@ -23,7 +23,8 @@ $(window).scroll(function () {
function SiderBar(props) {
const {location, history,user, mygetHelmetapi= {}} = props;
const {navbar=[]} = mygetHelmetapi;
const {navbar=[], common} = mygetHelmetapi;
const {forums: forumsDoMain} = common || {};
const forumsList = navbar.filter(item=>item.link && item.link.includes("/forums"))
const forumsUrl = forumsList[0] && forumsList[0].link;
const {search, pathname} = location;
@ -86,12 +87,12 @@ function SiderBar(props) {
//
function feedBackClick(){
if(login){
if(forumsUrl){
return window.location.href=forumsUrl;
if(forumsDoMain){
return window.location.href=`${forumsDoMain}/forums/new`;
}
setFeedBackModal(true);
}else{
history.push(`/login?go_page=${forumsUrl}`);
history.push(forumsDoMain ? `/login?go_page=${forumsDoMain}/forums/new` : `/login`);
}
}

View File

@ -322,6 +322,51 @@ class NewHeader extends Component {
zoneList,
isHome
} = this.state;
const navbarlist = [
{
"name": "军用可控开源社区",
"link": "/factory",
"index": "1",
"hidden": false
},
{
"name": "社区动态",
"link": "/news",
"index": "5",
"hidden": false
},
{
"name": "软件工厂专区",
"link": "/softwareFactory",
"index": "4",
"hidden": false
},
{
"name": "开源软件仓库",
"link": "/exploreStore",
"index": "2",
"hidden": false
},
{
"name": "供应链治理",
"link": "/projects",
"index": "3",
"hidden": false
},
{
"name": "协作开发",
"link": "/projects",
"index": "3",
"hidden": false
},
{
"name": "论坛交流",
"link": "/forums",
"index": "6",
"hidden": false
}
]
const navbarByRoute = ["/factory", "/exploreStore", "/projects", "/softwareFactory", "/news", "/forums"].includes(this.props.match.path) ? navbarlist : settings ? settings.navbar : []
// let search_url = settings && settings.common && settings.common.search;
return (
<div className={`${ publicNav ? 'newHeaders publicNav':'newHeaders'} ${ isHome && 'homeHeader' }`} id="nHeader">
@ -347,14 +392,14 @@ class NewHeader extends Component {
</a>
}
</div> */}
{/* {
{
settings && settings.nav_logo_url ?
<a href={settings && settings.new_course.default_url} className={"fl mr30"}>
<img alt="可控开源社区" className="logoimg" src={getImageUrl(`/${settings.nav_logo_url}`)}></img>
<img alt="菌用可控开源社区" className="logoimg" src={getImageUrl(`/${settings.nav_logo_url}`)}></img>
</a>
:
""
} */}
}
{/* <div className="head-nav pr"> */}
{
settings && settings.navbar && settings.navbar.length > 0 ?

View File

@ -27,6 +27,11 @@ const ProjectHome = Loadable({
loading: Loading,
});
const ProjectHomeWH = Loadable({
loader: () => import("./Main/projectHomeNew/v2/index"),
loading: Loading,
});
class Index extends Component {
componentDidUpdate = () => {
@ -68,6 +73,13 @@ class Index extends Component {
<Route
path="/explore"
render={(props) => (
<ProjectHomeWH {...this.props} {...props} />
)}
></Route>
<Route
path="/exploreStore"
render={(props) => (
<ProjectHome {...this.props} {...props} />
)}

View File

@ -31,7 +31,7 @@ function ProjectHomePage(props) {
getCate();
getList();
getCateTopic();
document.title = 'JY开源软件仓库';
document.title = '菌用开源软件仓库';
}, [])
useEffect(() => {
@ -247,4 +247,4 @@ function ProjectHomePage(props) {
</div>
}
export default TPMIndexHOC(ProjectHomePage)
export default ProjectHomePage

View File

@ -52,7 +52,7 @@ function ProjectHomePage(props) {
getCate();
// getList();
getCateTopic();
document.title = 'JY开源软件仓库';
document.title = '菌用开源软件仓库';
//
getInitCount();
}, [])
@ -154,7 +154,7 @@ function ProjectHomePage(props) {
<div className="banner-content">
<div className="homepageMain banner_main df">
<div className="">
<div className="font-30 color-white banner-title-1">JY开源软件仓库</div>
<div className="font-30 color-white banner-title-1">菌用开源软件仓库</div>
<div className="font-16 opacity80 color-white mt5 mb15">汇聚全球顶尖开源力量构建安全协同创新的软件生态赋能J事数字化转型与智能化升级</div>
<FeedBack {...props}/>
</div>
@ -263,7 +263,7 @@ function ProjectHomePage(props) {
</Tooltip>}
</div>
})}
</div> : <Nodata _html="暂无数据" />}
</div> : <Nodata _html="资源正在持续建设中,敬请期待" />}
</Spin>
{cateID && <Pagination pageSize={LIMIT} total={total} hideOnSinglePage={true} current={page} onChange={(page) => { setPage(page) }} className='center mt30' />}
</div>
@ -272,4 +272,4 @@ function ProjectHomePage(props) {
</div>
}
export default TPMIndexHOC(ProjectHomePage)
export default ProjectHomePage

View File

@ -6,7 +6,7 @@ import banner3 from '../../img/home/banner3.webp';
import { Link } from "react-router-dom";
const BANNER_DATA = [
{ key: 1, keyword: '仓库', name: 'JY开源软件仓库', title: 'JY开源软件仓库', content: '提供软件源码的集中托管与协作、编译构建后的制品统一管理并支持一键搜索与下载成熟可用的应用程序为J事软件的全生命周期提供一站式管理与分发服务', img: banner1 },
{ key: 1, keyword: '仓库', name: '菌用开源软件仓库', title: '菌用开源软件仓库', content: '提供软件源码的集中托管与协作、编译构建后的制品统一管理并支持一键搜索与下载成熟可用的应用程序为J事软件的全生命周期提供一站式管理与分发服务', img: banner1 },
{ key: 2, keyword: '供应链', name: '供应链监测', title: '供应链监测', content: '实现供应链全流程可视化与智能决策。通过实时数据监控、需求预测与风险预警,优化库存与资源配置,助力精准掌控供应链动态,实现降本增效', img: banner2 },
// { key: 3, keyword: '', name: '', title: '', content: '线', img: banner3 }
]

View File

@ -49,7 +49,7 @@ function Store(props) {
return (
<div className="home-store home-module">
<h1 className="module-title">JY开源软件仓库</h1>
<h1 className="module-title">菌用开源软件仓库</h1>
<p className="module-desc">一站式软件资源服务中心</p>
<div className="store-feature">
{

View File

@ -74,7 +74,7 @@ const RepositoryV2 = () => {
))}
</div>
<Button className="blackBut" href='/explore'>
<Button className="blackBut" href='/exploreStore'>
<span>了解更多</span>
<span>了解更多</span>
</Button>

View File

@ -2,6 +2,7 @@ import React from 'react';
import icon1 from '../image/icon25.png';
import icon2 from '../image/icon22.png';
import icon3 from '../image/icon26.png';
import moreContentButton from './moreContentButton';
const SupplyChainGovernance = () => {
const governanceItems = [
@ -78,6 +79,10 @@ const SupplyChainGovernance = () => {
</div>
))}
</div>
<div className='center mt40 mt-8'>
{moreContentButton({href:"/governance", classname:"font-16 but-to-right font-bd"})}
</div>
</div>
);
};

View File

@ -12,6 +12,7 @@ import EcosystemAlliance from './components/ecosystemAlliance';
import './animation.scss';
function Index(props) {
const {mygetHelmetapi: {name}, mygetHelmetapi} = props;
const observer = useRef();
const [visibleItems, setVisibleItems] = useState({});
@ -47,8 +48,8 @@ function Index(props) {
}, []);
useEffect(() => {
document.title = props.mygetHelmetapi && props.mygetHelmetapi.name ? props.mygetHelmetapi.name : '生态创新治理中心';
}, [])
document.title = name ? name : '菌用可控开源社区';
}, [name])
return (
<div className="home_v2">
@ -57,7 +58,7 @@ function Index(props) {
<OpenSourceCollaboration isVisible={visibleItems[`home_v2_child3`]}/>
<SoftwareFactory />
<Project />
<SupplyChainGovernance />
<SupplyChainGovernance/>
<Forum/>
<EcosystemAlliance />
</div>

View File

@ -387,6 +387,7 @@
}
.center-image-container-content {
min-width: 940px;
height: 530px;
background-image: url('./image/bk6.png'), linear-gradient(145deg, #1d36a1, #171e41);
background-size: 100% 100%;

View File

@ -150,7 +150,7 @@ function ProjectHomePage(props) {
</div>
<div className="feedBackBox ml20">
<div className="font-22">反馈需求共建优质体验</div>
<div className="font-15 opacity8 mt-5 mb10">欢迎大家随时通过官方渠道提出宝贵建议</div>
<div className="font-15 opacity8 mt-5 mb10">欢迎大家提出宝贵建议或需求反馈</div>
<FeedBack {...props} />
</div>
</div>
@ -244,7 +244,7 @@ function ProjectHomePage(props) {
return <div className="home_project">
<div className="df a-i-center" style={{ flex: 1 }}>
{i.lesson_url && <img src={getImageUrl(`${i.lesson_url}`)} alt="" className="author_img" />}
{!i.lesson_url && <img src={require("../image/icon14.png").default} alt="" className="author_img" />}
{/* {!i.lesson_url && <img src={require("../image/icon14.png").default} alt="" className="author_img" />} */}
<div className="flex1">
<Link to={url}><div className="task-hide font-16 color-dark hover-light" style={{ marginTop: '-5px' }} title={i.name}>{i.name}</div></Link>
{/* 项目标签 */}
@ -259,7 +259,8 @@ function ProjectHomePage(props) {
{i.description}
</div>
</Tooltip>} */}
{i.author && i.author.login !== "gh_mirrors" && <a className="download-icon mt10" href={url}><i className="iconfont icon-a-xiazai3 font-12 mr5 color-dark"></i>下载</a>}
{/* {i.author && i.author.login !== "gh_mirrors" && <a className="download-icon mt10" href={url}><i className="iconfont icon-a-xiazai3 font-12 mr5 color-dark"></i>下载</a>} */}
<div className="task-hide font-13 mt10 detail-desc">{i.description}</div>
<Button className="detail-but-black" href={url}>查看详情</Button>
</div>
})}

View File

@ -194,11 +194,18 @@
}
.author_img {
width: 54px;
height: 54px;
width: 35px;
height: 35px;
margin-right: 15px;
border-radius: 6px;
}
.detail-desc{
position: absolute;
bottom: 10px;
top: 0;
}
.download-icon {
color: #8284a4;
@ -218,7 +225,7 @@
.detail-but-black {
line-height: 32px;
width: 88%;
width: 85%;
color: #ffffff;
background-color: #2149d4;
border: none;

View File

@ -179,7 +179,7 @@ function ProjectList() {
</div>
</div>
<div className="df width1600">
<div className="project_list_all flex1 mr20">
<div className="project_list_all flex1">
<div className="project_list_all_title font-18">开源项目</div>
<div className="project_list_all_list">
<Spin spinning={isSpin}>
@ -217,9 +217,9 @@ function ProjectList() {
</div>
<Pagination pageSize={LIMIT} total={total} hideOnSinglePage={true} current={page} onChange={(page) => { setPage(page) }} className='center mt10' />
</div>
<div className="project_home_right">
{projectsListByHot && userList && (!!userList.length || !!projectsListByHot.length) && <div className="project_home_right ml20">
{/* 热门开发者 */}
<div className="project_home_right-user mb20">
{userList && !!userList.length && <div className="project_home_right-user mb20">
<div className="font-18 project_home_right-title">
<img src={require('../image/icon1.png')} width={24} className="mr8" />
热门开发者
@ -230,9 +230,9 @@ function ProjectList() {
<Link to={`/${user.login}`}>{user.name}</Link>
</div>
})}
</div>
</div>}
{/* 热门项目 */}
<div className="project_home_right-project project_home_right-user pb30">
{projectsListByHot && !!projectsListByHot.length && <div className="project_home_right-project project_home_right-user pb30">
<div className="font-18 clearfix project_home_right-title">
<img src={require('../image/icon2.png')} width={24} className="mr8" />
热门项目
@ -252,8 +252,8 @@ function ProjectList() {
</Panel>
})}
</Collapse>
</div>
</div>
</div>}
</div>}
</div>
</div>
</div>

View File

@ -176,26 +176,25 @@ function List(props) {
const isSelected = forumTagDetail && forumTagDetail.id === item.id;
const forums = item.essencePosts[0] || {};
return (
<div className={`forums-section-item flex1 ${isSelected && 'active'}`} onClick={()=>{setForumTagDetail(item)}}>
<div className="font-20 font-bd center section-title mt8 mb5">{item.title}</div>
<div key={index} className={`forums-section-item flex1 ${isSelected && 'active'}`} onClick={()=>{setForumTagDetail(item)}}>
<div className="font-20 font-bd center section-title mt8 mb5"></div>
<div className="forums-section-item-content">
{forums.memo_image_info && <img src={httpUrl + forums.memo_image_info.url} alt="" className="memo_image_info"/>}
<div className="pl20 pr20">
<Link to={`/forums/${forums.id}`} className="AlignCenter pt10 pb10">
<div className="task-hide font-22">{forums.subject}</div>
<i className="iconfont icon-jiantou3 ml5 font-20"></i>
</Link>
<a onClick={()=>{setForumTagDetail(item)}} className="AlignCenter pt10 pb10">
<div className="task-hide font-22">{item.title}</div>
</a>
<div className="pt10 pb10">
<img src={forums.image_url} alt="" className="user-img" />
{forums.username}
</div>
<div className="opacity8 clearfix pt10 pb10">
{/* <div className="opacity8 clearfix pt10 pb10">
<img src={icon5} width={14} className="mb3 mr5" />
{forums.praises_count}
<img src={icon6} width={14} className="mb3 mr5 ml10" />
{forums.replies_count}
<span className="fr">{forums.published_time}</span>
</div>
</div> */}
</div>
</div>
</div>