页面优化调整
This commit is contained in:
parent
f2b6a48f67
commit
2e9ee75778
|
|
@ -1,9 +1,9 @@
|
|||
import React, { useEffect, useState, useRef } from 'react';
|
||||
import './index.scss';
|
||||
import featureLeft1 from '../../../images/factory/feature-left-1.webp';
|
||||
import featureLeft2 from '../../../images/factory/feature-left-2.webp';
|
||||
import featureLeft2 from '../../../images/factory/feature-left-2.jpg';
|
||||
import featureright1 from '../../../images/factory/feature-right-1.webp';
|
||||
import featureright2 from '../../../images/factory/feature-right-2.webp';
|
||||
import featureright2 from '../../../images/factory/feature-right-2.jpg';
|
||||
import featureBottom1 from '../../../images/factory/feature-bottom-1.webp';
|
||||
import gif1 from '../../../images/factory/feature-gif-1.webp'
|
||||
import gif2 from '../../../images/factory/feature-gif-2.gif'
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@
|
|||
|
||||
img {
|
||||
width: 614px;
|
||||
height: 320.54px;
|
||||
margin-top:48px;
|
||||
}
|
||||
|
||||
&-gif {
|
||||
|
|
@ -103,8 +103,8 @@
|
|||
.left-1 {
|
||||
background-image: url('../../../images/factory/feature-left-bg2.webp');
|
||||
img {
|
||||
width: 669px;
|
||||
height: unset;
|
||||
width: 620px;
|
||||
margin-top: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -119,6 +119,7 @@
|
|||
img {
|
||||
margin-top: 0;
|
||||
width: 735px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
div {
|
||||
|
|
@ -143,8 +144,9 @@
|
|||
.right-2 {
|
||||
background-image: url('../../../images/factory/feature-right-bg.webp');
|
||||
img {
|
||||
width: 708px;
|
||||
margin-top: 22px
|
||||
width: 648px;
|
||||
margin-top: 22px;
|
||||
margin-left: auto;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -221,6 +223,7 @@
|
|||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
height: 82px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
button {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ gsap.registerPlugin(ScrollTrigger);
|
|||
const resourceInfo = [
|
||||
{ name: '项目', title: '工厂开源项目', icon: 'icon-xiangmu', desc: '标准化生产线核心代码及软件工厂开发工具源码', path: '/softwareFactory/resource/softwareProject' },
|
||||
{ name: '版本', title: '生产线安装包', icon: 'icon-banben', desc: '标准化生产线快速迭代版本和稳定支持版本', path: '/softwareFactory/resource/factoryVersion' },
|
||||
{ name: '工具', title: '共建共用工具', icon: 'icon-gongju', desc: '由XX集团、科研院所、地方企业等提供,可免费共用的工具', path: '/softwareFactory/resource/commonTools' },
|
||||
{ name: '工具', title: '共建共用工具', icon: 'icon-gongju', desc: '由菌工集团、科研院所、地方企业等提供,可免费共用的工具', path: '/softwareFactory/resource/commonTools' },
|
||||
{ name: '软件', title: '开源社区软件', icon: 'icon-gongju', desc: '来自开源社区,可按授权许可使用和复用的各类软件', path: '/softwareFactory/resource/developmentTools' },
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ function Index(props) {
|
|||
const containerRef = useRef(null);
|
||||
const pageSize = 10
|
||||
const [pageNum, setPageNum] = useState(1)
|
||||
const [hasMore, setHasMore] = useState(true)
|
||||
const [loading, setLoading] = useState(false)
|
||||
const [total, setTotal] = useState(0)
|
||||
const hasMore = useRef(true)
|
||||
|
||||
useEffect(() => {
|
||||
document.title = '动态速递-软件工厂专区';
|
||||
|
|
@ -70,7 +70,7 @@ function Index(props) {
|
|||
}
|
||||
|
||||
const getFullList = (isMore = false) => {
|
||||
if (!hasMore) return
|
||||
if (!hasMore.current) return
|
||||
setLoading(true)
|
||||
getSubDocList(dirId, { isHomepage: 0, pageSize, pageNum : isMore || pageNum }).then(res => {
|
||||
const rows = res.data.rows
|
||||
|
|
@ -84,7 +84,7 @@ function Index(props) {
|
|||
setNewsList2(rows.slice(2, 6))
|
||||
setNewsList3(rows.slice(6))
|
||||
}
|
||||
setHasMore(res.data.total > (isMore ? 6 + newsList3.length + rows.length : rows.length))
|
||||
hasMore.current = (res.data.total > (isMore ? 6 + newsList3.length + rows.length : rows.length))
|
||||
setTotal(res.data.total)
|
||||
})
|
||||
}
|
||||
|
|
@ -213,7 +213,7 @@ function Index(props) {
|
|||
initialLoad={false}
|
||||
pageStart={1}
|
||||
loadMore={(e) => { getFullList(e) }}
|
||||
hasMore={!loading && hasMore}
|
||||
hasMore={!loading && hasMore.current}
|
||||
>
|
||||
<div className="news-body-bottom">
|
||||
{
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ function Index(props) {
|
|||
<span>下载量</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>{detail.fileList && detail.fileList[0] && detail.fileList[0].fileSizeInfo}</span>
|
||||
<span>{detail.fileList && detail.fileList[0] ? detail.fileList[0].fileSizeInfo : 0}</span>
|
||||
<span>文件大小</span>
|
||||
</div>
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@
|
|||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-fit: contain;
|
||||
border-radius: 10px;
|
||||
|
||||
&:nth-child(2) {
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ function Index(props) {
|
|||
} else {
|
||||
setFullList(rows);
|
||||
}
|
||||
hasMore.current = res.data.total > fullList.length
|
||||
hasMore.current = res.data.total > [...fullList, ...rows].length
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -77,7 +77,7 @@ function Index(props) {
|
|||
return (
|
||||
<div className="commontools">
|
||||
<div className="commontools-content">
|
||||
<p>由XX集团、科研院所、地方企业等提供,可免费共用的工具</p>
|
||||
<p>由菌工集团、科研院所、地方企业等提供,可免费共用的工具</p>
|
||||
{
|
||||
fullList.length > 0 && <InfiniteScroll
|
||||
threshold={10}
|
||||
|
|
|
|||
|
|
@ -123,10 +123,13 @@
|
|||
align-items: center;
|
||||
|
||||
img {
|
||||
width: 53px;
|
||||
height: 53px;
|
||||
border-radius: 50%;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border-radius: 8px;
|
||||
margin-right: 18px;
|
||||
object-fit: contain;
|
||||
border: 1px solid #eaeff9;
|
||||
padding: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ function Index(props) {
|
|||
<span>下载量</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>{detail.fileList && detail.fileList[0] && detail.fileList[0].fileSizeInfo}</span>
|
||||
<span>{detail.fileList && detail.fileList[0] ? detail.fileList[0].fileSizeInfo : 0}</span>
|
||||
<span>文件大小</span>
|
||||
</div>
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@
|
|||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-fit: contain;
|
||||
border-radius: 10px;
|
||||
|
||||
&:nth-child(2) {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ function Index(props) {
|
|||
const getFullList = () => {
|
||||
|
||||
getSourceList({ id: factoryZoneId, keywords: versionId }).then(res => {
|
||||
setVersionList([res.data.rows[0], sourceCode]);
|
||||
setVersionList([...res.data.rows, sourceCode]);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ function Index(props) {
|
|||
<span><i className="iconfont-factory icon-shijian mr5 font-12" />{item.createTime}</span>
|
||||
</div>
|
||||
</div>
|
||||
<button onClick={() => { index === 0 && downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`)}} className={index === 0 ? "shiny-button" : "version-btn"}>{ index === 0 ? '立即下载' : '暂未开放'}</button>
|
||||
<button onClick={() => { index !== versionList.length - 1 && downloadFunc(`${httpUrl}/file/open/download/${item.fileIds}`)}} className={index === 0 ? "shiny-button" : "version-btn"}>{ index !== versionList.length - 1 ? '立即下载' : '暂未开放'}</button>
|
||||
</div>
|
||||
</div>
|
||||
})
|
||||
|
|
|
|||
|
|
@ -149,17 +149,18 @@
|
|||
}
|
||||
|
||||
button {
|
||||
cursor: pointer;
|
||||
margin-top: 20px;
|
||||
width: 104px;
|
||||
height: 36px;
|
||||
background-color: rgba(255, 255, 255, 0.42);
|
||||
border: 1px solid;
|
||||
border-color: gray;
|
||||
border-color: #091221;
|
||||
border-radius: 9px;
|
||||
line-height: 20px;
|
||||
font-family: alibaba;
|
||||
font-weight: 500;
|
||||
color: gray;
|
||||
color: #091221;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,15 +32,15 @@ function Index(props) {
|
|||
const [fullList, setFullList] = useState([]);
|
||||
const pageSize = 10
|
||||
const [pageNum, setPageNum] = useState(1)
|
||||
const [hasMore, setHasMore] = useState(true)
|
||||
const [loading, setLoading] = useState(false)
|
||||
const hasMore = useRef(true)
|
||||
|
||||
useEffect(() => {
|
||||
getFullList();
|
||||
}, []);
|
||||
|
||||
const getFullList = (isMore = false) => {
|
||||
if (!hasMore) return
|
||||
if (!hasMore.current) return
|
||||
setLoading(true)
|
||||
getProjectsLists(factoryZoneId, { isHomepage: 0, pageSize, pageNum: isMore || pageNum }).then(res => {
|
||||
const rows = res.data.rows
|
||||
|
|
@ -54,8 +54,8 @@ function Index(props) {
|
|||
setContentList(res.data.rows.slice(0, 4));
|
||||
// 后面项目作为 fullList
|
||||
setFullList(res.data.rows.slice(4));
|
||||
}
|
||||
setHasMore(res.data.total > (isMore ? 4 + fullList.length + rows.length : rows.length))
|
||||
}
|
||||
hasMore.current = (res.data.total > (isMore ? 4 + fullList.length + rows.length : rows.length))
|
||||
// setTotal(res.data.total)
|
||||
});
|
||||
};
|
||||
|
|
@ -111,7 +111,7 @@ function Index(props) {
|
|||
initialLoad={false}
|
||||
pageStart={1}
|
||||
loadMore={(e) => { getFullList(e) }}
|
||||
hasMore={!loading && hasMore}
|
||||
hasMore={!loading && hasMore.current}
|
||||
>
|
||||
<div className="project-content-bottom">
|
||||
{
|
||||
|
|
@ -139,7 +139,7 @@ function Index(props) {
|
|||
)
|
||||
})
|
||||
} */}
|
||||
<img src={user1} alt="" />
|
||||
<img src={user2} alt="" />
|
||||
<span>共建方</span> <div></div>{project.name.split('/')[0]}
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -356,12 +356,13 @@
|
|||
}
|
||||
.item-data {
|
||||
span {
|
||||
color: #ffffff;
|
||||
|
||||
color: #ffffff;
|
||||
&:after {
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
.item-tags {
|
||||
width: 157px;
|
||||
height: 32px;
|
||||
background: rgba(179, 190, 252, 0.18);
|
||||
border: 1px solid;
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 331 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 146 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 301 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 173 KiB |
Loading…
Reference in New Issue