bug fix
|
|
@ -18,21 +18,6 @@ const EcosystemAlliance = () => {
|
|||
|
||||
}, [])
|
||||
|
||||
// const partners = [
|
||||
// { name: '国防科技大学', logo: require('../image/logo1.png') },
|
||||
// { name: '航天工程大学', logo: require('../image/logo3.png').default },
|
||||
// { name: '信息工程大学', logo: require('../image/logo4.png').default },
|
||||
// { name: '海军工程大学', logo: require('../image/logo5.png') },
|
||||
// { name: '陆军工程大学', logo: require('../image/logo6.png') },
|
||||
// { name: '中国电子北京中软', logo: require('../image/logo7.png').default },
|
||||
// { name: '中国电科第十五研究所', logo: require('../image/logo8.png').default },
|
||||
// { name: '华为', logo: require('../image/logo2.png') },
|
||||
// { name: '麒麟', logo: require('../image/logo9.png') },
|
||||
// { name: '飞腾', logo: require('../image/logo10.png') },
|
||||
// { name: '阿里云', logo: require('../image/logo11.png') },
|
||||
// { name: '中国电子云', logo: require('../image/logo12.png') },
|
||||
// { name: '中国移动云', logo: require('../image/logo13.png').default }
|
||||
// ];
|
||||
// 将合作伙伴数据分成两部分
|
||||
// const firstRowPartners = partners.slice(0, Math.ceil(partners.length / 2));
|
||||
// const secondRowPartners = partners.slice(Math.ceil(partners.length / 2));
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
|
@ -134,6 +134,8 @@
|
|||
font-weight: normal;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
font-size: 17px;
|
||||
top: 3px;
|
||||
}
|
||||
}
|
||||
.activity-section-item{
|
||||
|
|
@ -148,7 +150,7 @@
|
|||
background-color: #2149d4;
|
||||
}
|
||||
&-active::after{
|
||||
animation: bottomflowLight 3.5s forwards;
|
||||
animation: bottomflowLight 3s forwards;
|
||||
}
|
||||
}
|
||||
.activity-section-item-active .title-border-to-right-icon{
|
||||
|
|
@ -386,12 +388,12 @@
|
|||
|
||||
.center-image-container-content {
|
||||
height: 461px;
|
||||
|
||||
background-image: url('./image/bk6.png');
|
||||
background-image: url('./image/bk6.png'), linear-gradient(145deg, #1d36a1, #171e41);
|
||||
background-size: 100% 100%;
|
||||
border-radius: 15px;
|
||||
|
||||
img {
|
||||
max-width: 99%;
|
||||
max-width: 94.6%;
|
||||
}
|
||||
|
||||
&-title {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import React, { createRef, useEffect, useState } from "react";
|
||||
import React, { createRef, Fragment, useEffect, useState } from "react";
|
||||
import axios from "axios";
|
||||
import { Button, Carousel, Divider, Input, Pagination, Popover, Spin, Tooltip } from "antd";
|
||||
import { Link } from "react-router-dom";
|
||||
|
|
@ -9,7 +9,12 @@ import RenderHtml from "../../../components/render-html";
|
|||
import FeedBack from "../../../forge/Component/feedBack";
|
||||
import './index.scss';
|
||||
import ActionItem from "../../../factory/resource/components/ActionItem";
|
||||
import img1 from '../image/icon15.png'
|
||||
import img1 from '../image/icon15.png';
|
||||
import img2 from '../image/icon9.png';
|
||||
import img3 from '../image/icon10.png';
|
||||
import img4 from '../image/icon11.png';
|
||||
import img5 from '../image/icon12.png';
|
||||
import img6 from '../image/icon13.png';
|
||||
const { Search } = Input;
|
||||
function ProjectHomePage(props) {
|
||||
const carouselEL = createRef()
|
||||
|
|
@ -25,9 +30,30 @@ function ProjectHomePage(props) {
|
|||
const [cateTopics, setCateTopics] = useState(undefined);
|
||||
const [topicId, setTopicId] = useState(undefined);
|
||||
const [topicDetail, setTopicDetail] = useState(undefined);
|
||||
const [count, setCount] = useState({});
|
||||
const { countByGHM, countByOther, countByGHMType, countByMX, countByRQ } = count;
|
||||
const [count, setCount] = useState([
|
||||
{
|
||||
"name": "应用软件",
|
||||
"value": "405+"
|
||||
},
|
||||
{
|
||||
"name": "三方组件",
|
||||
"value": "10+"
|
||||
},
|
||||
{
|
||||
"name": "数据集",
|
||||
"value": "1000+"
|
||||
},
|
||||
{
|
||||
"name": "智能模型",
|
||||
"value": "99+"
|
||||
},
|
||||
{
|
||||
"name": "容器镜像",
|
||||
"value": "10+"
|
||||
}
|
||||
]);
|
||||
const topicsByCateId = cateTopics && cateTopics[cateID];
|
||||
const logo = [img2, img3 ,img4, img5, img6]
|
||||
|
||||
const topicsLength = topicsByCateId && topicsByCateId.length
|
||||
const LIMIT = !topicsLength ? 30 : 25;
|
||||
|
|
@ -47,30 +73,9 @@ function ProjectHomePage(props) {
|
|||
}, [cateID, search, page, topicId])
|
||||
|
||||
function getInitCount() {
|
||||
const obj = {
|
||||
countByGHM: 20000,
|
||||
countByOther: 0,
|
||||
countByGHMType: 10
|
||||
}
|
||||
axios.get(`/organizations/gh_mirrors/projects.json?page=1&limit=15&sort_by=updated_on&sort_direction=desc`).then(result => {
|
||||
if (result && result.data) {
|
||||
obj.countByGHM = result.data.total_count || 0
|
||||
}
|
||||
return axios.get(`/projects.json?pinned=d&limit=1`)
|
||||
}).then(result => {
|
||||
if (result && result.data) {
|
||||
obj.countByOther = result.data.total_count - obj.countByGHM
|
||||
}
|
||||
}).finally(() => {
|
||||
// cateTopics && cateTopics[39] && (obj.countByGHMType = cateTopics[39].length)
|
||||
setCount({
|
||||
countByGHM: 1000,
|
||||
countByOther: obj.countByOther,
|
||||
countByGHMType: 10,
|
||||
countByMX: 99,
|
||||
countByRQ: 10
|
||||
});
|
||||
})
|
||||
fetch('/statsConfig.json').then(r => r.json()).then(res => {
|
||||
setCount(res)
|
||||
});
|
||||
}
|
||||
|
||||
function getCateTopic() {
|
||||
|
|
@ -132,30 +137,16 @@ function ProjectHomePage(props) {
|
|||
<div className="font-18 center mb40">汇聚全球顶尖开源力量,构建安全、协同、创新的软件生态,赋能J事数字化转型与智能化升级</div>
|
||||
<div className="df">
|
||||
<div className="df color-white project_count flex1 FlexAJ">
|
||||
<div className="project_count_item">
|
||||
<p><img src={require('../image/icon9.png')} className="mr15 mt5" width={30} />{countByOther}<span className="font-24">+</span></p>
|
||||
<span className="opacity8 pl45">应用软件</span>
|
||||
</div>
|
||||
<Divider type="vertical" />
|
||||
<div className="project_count_item">
|
||||
<p><img src={require('../image/icon10.png')} className="mr15 mt5" width={30} />{countByGHMType}<span className="font-24">+</span></p>
|
||||
<span className="opacity8 pl45">三方组件</span>
|
||||
</div>
|
||||
<Divider type="vertical" />
|
||||
<div className="project_count_item">
|
||||
<p><img src={require('../image/icon11.png')} className="mr15 mt5" width={30} />{countByGHM}<span className="font-24">+</span></p>
|
||||
<span className="opacity8 pl45">数据集</span>
|
||||
</div>
|
||||
<Divider type="vertical" />
|
||||
<div className="project_count_item">
|
||||
<p><img src={require('../image/icon12.png')} className="mr15 mt5" width={30} />{countByMX}<span className="font-24">+</span></p>
|
||||
<span className="opacity8 pl45">智能模型</span>
|
||||
</div>
|
||||
<Divider type="vertical" />
|
||||
<div className="project_count_item">
|
||||
<p><img src={require('../image/icon13.png')} className="mr15 mt5" width={30} />{countByRQ}<span className="font-24">+</span></p>
|
||||
<span className="opacity8 pl45">容器镜像</span>
|
||||
</div>
|
||||
{count.map((item, index)=>{
|
||||
const logoIndex = index%5
|
||||
return <Fragment>
|
||||
<div className="project_count_item">
|
||||
<p><img src={logo[logoIndex]} className="mr15 mt5" width={30} />{item.value}</p>
|
||||
<span className="opacity8 pl45">{item.name}</span>
|
||||
</div>
|
||||
{index < count.length-1 && <Divider type="vertical" />}
|
||||
</Fragment>
|
||||
})}
|
||||
</div>
|
||||
<div className="feedBackBox ml20">
|
||||
<div className="font-22">反馈需求,共建优质体验</div>
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
position: absolute;
|
||||
right: 0px;
|
||||
font-size: 16px;
|
||||
top: 5px;
|
||||
top: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { useEffect, useState } from "react";
|
||||
import './index.scss';
|
||||
import { Button, Carousel, Divider, Tag } from "antd";
|
||||
import { Button, Carousel, Divider, Pagination, Tag } from "antd";
|
||||
import { getForumsById, getForumSections, getForumsList } from "../api";
|
||||
import { httpUrl } from "../fetch";
|
||||
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
|
||||
|
|
@ -22,6 +22,9 @@ function List(props) {
|
|||
// 选中的板块详情
|
||||
const [forumTagDetail, setForumTagDetail] = useState(undefined);
|
||||
// 选中的板块对应的帖子列表
|
||||
const LIMIT = 10;
|
||||
const [total, setTotal] = useState(0);
|
||||
const [page, setPage] = useState(1);
|
||||
const [forumListByTag, setForumListByTag] = useState([]);
|
||||
// 轮播的active
|
||||
const [activeId, setActiveId] = useState(0);
|
||||
|
|
@ -106,18 +109,19 @@ function List(props) {
|
|||
if (forumTagDetail && forumTagDetail.id) {
|
||||
const forums = forumTagDetail.essencePosts[0] || {}
|
||||
getForumsById(forumTagDetail.id, {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
page: page,
|
||||
limit: LIMIT,
|
||||
sort: 'published_at',
|
||||
select_type: 'all',
|
||||
hide_id: forums.id
|
||||
}).then(res => {
|
||||
if (res) {
|
||||
setForumListByTag(res.memos || []);
|
||||
setTotal(res.memos_count);
|
||||
}
|
||||
})
|
||||
}
|
||||
}, [forumTagDetail && forumTagDetail.id])
|
||||
}, [forumTagDetail && forumTagDetail.id, page])
|
||||
|
||||
return (
|
||||
<div className="forums-list-box">
|
||||
|
|
@ -128,7 +132,7 @@ function List(props) {
|
|||
{forumsDoMain && <Button className="add-forums" href={`${forumsDoMain}/forums/new`}>发布帖子</Button>}
|
||||
</div>
|
||||
<div className="width1600 df pt70">
|
||||
<Carousel autoplay className='forums-list-left-Carousel' afterChange={(current)=>{setActiveId(current)}}>
|
||||
<Carousel autoplay infinite={0} className='forums-list-left-Carousel' afterChange={(current)=>{setActiveId(current)}}>
|
||||
{forumsImgList.map((item, index)=>{
|
||||
return <img src={httpUrl + item.memo_image_info.url} alt=''key={index}/>
|
||||
})}
|
||||
|
|
@ -200,10 +204,11 @@ function List(props) {
|
|||
</div>
|
||||
{/* 板块对应的帖子列表 */}
|
||||
<div className="forums-list4-box mt30">
|
||||
{forumListByTag.map((item, index) => (
|
||||
<div className="forums-list4-item">
|
||||
{forumListByTag.map((item, index) => {
|
||||
const orderIndex = index+LIMIT*(page-1)
|
||||
return <div className="forums-list4-item">
|
||||
<div className="pr80 AlignCenter">
|
||||
{index < 3 ? <img src={sortImg1[index]} width={24} className="mr10"/> : <span className="font-bd font-20 mr10">{index + 1}</span>}
|
||||
{orderIndex < 3 ? <img src={sortImg1[orderIndex]} width={24} className="mr10"/> : <span className="font-bd font-20 mr10">{orderIndex + 1}</span>}
|
||||
<Link to={`/forums/${item.id}`} className="forums-list4-item-link font-22 task-hide">{item.subject}<i className="iconfont icon-jiantou3 ml5 font-20"></i></Link>
|
||||
{item.sticky && <Tag color="#d06d3c">置顶</Tag>}
|
||||
{item.is_original && <Tag color="#7e41f1">原创</Tag>}
|
||||
|
|
@ -224,10 +229,11 @@ function List(props) {
|
|||
{item.viewed_count}
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
})}
|
||||
{forumListByTag.length === 0 && (
|
||||
<Nodata _html="暂无数据" />
|
||||
)}
|
||||
)}
|
||||
<Pagination pageSize={LIMIT} total={total} hideOnSinglePage={true} current={page} onChange={(page) => { setPage(page) }} className='center mt30' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 206 KiB After Width: | Height: | Size: 124 KiB |
|
After Width: | Height: | Size: 132 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
|
@ -7,13 +7,15 @@ import "./index.scss";
|
|||
import moment from "moment";
|
||||
import RenderHtml from "../../components/render-html";
|
||||
import icon2 from '../image/icon2.png'
|
||||
import icon13 from '../image/icon13.png'
|
||||
import icon14 from '../image/icon14.png'
|
||||
|
||||
function List() {
|
||||
const [list1, setList1] = useState([]);
|
||||
const [list2, setList2] = useState([]);
|
||||
const [firstActivity, setFirstActivity] = useState(undefined);
|
||||
const [list3, setList3] = useState([]);
|
||||
const firstDynamics = list3[0]
|
||||
const firstDynamics = list3.slice(0,2);
|
||||
|
||||
useEffect(() => {
|
||||
document.title = "社区动态";
|
||||
|
|
@ -38,7 +40,7 @@ function List() {
|
|||
})
|
||||
}
|
||||
})
|
||||
getSubDocList(39).then(res => {
|
||||
getSubDocList(39, {orderByColumn: "publishTime", isAsc: 'desc'}).then(res => {
|
||||
if (res && res.data.rows) {
|
||||
let rows = res.data.rows;
|
||||
setList3(rows);
|
||||
|
|
@ -114,13 +116,17 @@ function List() {
|
|||
<div className="dynamics-box pb60">
|
||||
<div className="font-40 font-bd center pt80 pb60">项目动态</div>
|
||||
<div className="width1600 df pb100">
|
||||
{firstDynamics && <div className="firstDynamics">
|
||||
<div className="font-22 task-hide-2">{firstDynamics.name}</div>
|
||||
<div className="font-15 opacity8">{firstDynamics.summary}</div>
|
||||
{/* <Button className="black-border-button mt30">了解更多</Button> */}
|
||||
{firstDynamics && firstDynamics.length && <div className="firstDynamics-box">
|
||||
{firstDynamics.map((item, index)=>{
|
||||
return <div className="firstDynamics-item">
|
||||
<img src={!!index ? icon14 : icon13} width={48}/>
|
||||
<div className="font-22 task-hide mb10 pl10">{item.name}</div>
|
||||
<div className="font-15 pl10 task-hide-2">{item.summary}</div>
|
||||
</div>
|
||||
})}
|
||||
</div>}
|
||||
<div className="dynamics-list">
|
||||
{list3.slice(1, 9).map(item=>{
|
||||
{list3.slice(2, 10).map(item=>{
|
||||
return <div className="dynamics-item" key={item.id}>
|
||||
<div className="font-22 FlexAJ">
|
||||
<span className="task-hide flex1">{item.name}</span>
|
||||
|
|
|
|||
|
|
@ -114,6 +114,24 @@
|
|||
min-height: 420px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.firstDynamics-box{
|
||||
margin-right: 20px;
|
||||
width: 25%;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.firstDynamics-item{
|
||||
border-radius: 10px;
|
||||
padding: 20px 15px;
|
||||
background-image: url('../image/bk3.png');
|
||||
background-size: 100% 100%;
|
||||
&:nth-child(2){
|
||||
background-image: url('../image/bk8.png');
|
||||
}
|
||||
}
|
||||
.dynamics-box{
|
||||
background-image:linear-gradient(179.88deg,#ffffff 0%,rgba(255, 255, 255, 0.62) 16.1%,rgba(255, 255, 255, 0) 100%);
|
||||
border-radius:40px 40px 0 0;
|
||||
|
|
|
|||