diff --git a/src/forge/Information/Pages/homepage/component/newsByNSCC.jsx b/src/forge/Information/Pages/homepage/component/newsByNSCC.jsx index 9f46400d8..957b58c00 100644 --- a/src/forge/Information/Pages/homepage/component/newsByNSCC.jsx +++ b/src/forge/Information/Pages/homepage/component/newsByNSCC.jsx @@ -86,18 +86,7 @@ function News(props) { }); } - if(rowId) { - getSubDocList(rowId,{pageSize:3,pageNum:1,auditStatus:1}).then(result=>{ - if(result && result.data.rows){ - let rows = result.data.rows; - const existIds = new Set(docList.map(item => item.id)); - const newRows = rows.filter(row => !existIds.has(row.id)); - docList = [...docList, ...newRows]; - } - }).finally(() => { - setDocListBySecondDir(docList); - }) - } + setDocListBySecondDir(docList); }); } diff --git a/src/forge/Information/Pages/homepage/component/projectByNSCC.jsx b/src/forge/Information/Pages/homepage/component/projectByNSCC.jsx index 552713974..28f9a1f8f 100644 --- a/src/forge/Information/Pages/homepage/component/projectByNSCC.jsx +++ b/src/forge/Information/Pages/homepage/component/projectByNSCC.jsx @@ -16,7 +16,6 @@ function TypeCarousel({pageSize=4, list=[], typeId, onClick}) { const start = i * pageSize; const end = start + pageSize; pages.push(list.slice(start, end)); - console.log('ppp', pages) } return {pages.map((page, index)=>{ @@ -25,7 +24,7 @@ function TypeCarousel({pageSize=4, list=[], typeId, onClick}) { {page.map((item, i) => { const order = index*pageSize+i const iconName = { - "精选项目": "icon-jingxuanxiangmu", + "精选项目": "icon-jingxuanxiangmu1", "并行计算框架": "icon-binghangjisuankuangjia", "异构数据库": "icon-yigoushujuku", "性能基准与评测": "icon-xingnengjizhunyupingce", @@ -192,18 +191,17 @@ function Project({ data, nsccTitle }) { } - const topDetail = (className="online_detail", i, index, length) => { + const topDetail = (className="top_detail", i, index, length) => { const { extra: { } } = i || {} - return
window.open(i.projectURL)}> + return
window.open(i.projectURL)}>
- {i.projectProperties && i.projectProperties.name} + {i.projectProperties && i.projectProperties.name}
-
+
{i.projectProperties.description || "暂无描述"}
-
    - {i.projectProperties.language &&
  • {i.projectProperties.language}
  • } +
      { i.projectProperties && i.projectProperties.topics && i.projectProperties.topics.split(",").map(t => { @@ -214,19 +212,20 @@ function Project({ data, nsccTitle }) { }
-

-

+

+

{i.projectProperties.language && ( <> - {i.projectProperties.language} +
+ {i.projectProperties.language} )} - {i.projectProperties.timeAgo && 更新于{i.projectProperties.timeAgo}} + {i.projectProperties.timeAgo && 更新于{i.projectProperties.timeAgo}}
- 赞{i.projectProperties.praisesCount} - fork{i.projectProperties.forkedCount} + 赞 {i.projectProperties.praisesCount} + fork {i.projectProperties.forkedCount}

@@ -259,16 +258,16 @@ function Project({ data, nsccTitle }) {
{topList.slice(0, 3).map((i, index)=>{ - return topDetail("online_detail", i, index, 3) + return topDetail("top_detail", i, index, 3) })}
- {lists.length > 3 &&
+ {topList.length > 3 &&
{topList.slice(3).map((i, index)=>{ - return topDetail("second_detail", i, index, lists.slice(4).length) + return topDetail("top_detail", i, index, topList.slice(4).length) })}
} - {setPage(page)}} className='center mt30'/> - {!loading && lists.length === 0 && } + {/* {setPage(page)}} className='center mt30'/> */} + {!loading && topList.length === 0 && } } diff --git a/src/forge/Information/Pages/homepage/image/projectBk4.png b/src/forge/Information/Pages/homepage/image/projectBk4.png new file mode 100644 index 000000000..c93238443 Binary files /dev/null and b/src/forge/Information/Pages/homepage/image/projectBk4.png differ diff --git a/src/forge/Information/Pages/homepage/image/python_color.png b/src/forge/Information/Pages/homepage/image/python_color.png new file mode 100644 index 000000000..a186d9519 Binary files /dev/null and b/src/forge/Information/Pages/homepage/image/python_color.png differ diff --git a/src/forge/Information/Pages/homepage/image/python_white.png b/src/forge/Information/Pages/homepage/image/python_white.png new file mode 100644 index 000000000..1d02ab265 Binary files /dev/null and b/src/forge/Information/Pages/homepage/image/python_white.png differ diff --git a/src/forge/Information/Pages/homepage/index.scss b/src/forge/Information/Pages/homepage/index.scss index 9b054ce4c..a4877fce6 100644 --- a/src/forge/Information/Pages/homepage/index.scss +++ b/src/forge/Information/Pages/homepage/index.scss @@ -829,7 +829,7 @@ } } .firstDir_NSCC{ - width:690px; + width:910px; background-color: #F6F8FD; border-radius:15px; box-shadow:0px 0px 12px rgba(33, 73, 212, 0.1); @@ -875,7 +875,7 @@ } .firstDoc_Img{ - width:690px; + width:910px; object-fit: cover; transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); } @@ -896,8 +896,32 @@ padding: 30px 25px; max-height:653px; overflow-y: auto; + position: relative; + overflow: hidden; + backdrop-filter: blur(12px); + &::before{ + content: ''; + position: absolute; + left: 0; right: 0; + height: 60px; + z-index: 3; + pointer-events: none; + top: 0; + background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), transparent); + } + &::after{ + content: ''; + position: absolute; + left: 0; right: 0; + height: 60px; + z-index: 3; + pointer-events: none; + bottom: 0; + background: linear-gradient(to top, rgba(255, 255, 255, 0.8), transparent); + } } .docBySecondDir_NSCC{ + cursor: pointer; background-image:linear-gradient(180deg,#f4f7ff 0%,#ffffff 100%); border-radius:15px; box-shadow:0px 0px 12px rgba(33, 73, 212, 0.06); @@ -984,11 +1008,6 @@ padding: 22px 20px 20px 20px; border-radius:15px; box-shadow:0px 0px 12px rgba(33, 73, 212, 0.1); - .topitem{ - background-color: rgba(0, 0, 0, 0.08); - padding: 4px 8px; - border-radius: 4px; - } &:hover{ background-image: url('./image/projectBk2.png'); span, div{ @@ -1002,9 +1021,6 @@ background-color:rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.5); } - .topitem{ - background-color: rgba(255, 255, 255, 0.12); - } } } .second_detail{ @@ -1049,6 +1065,87 @@ } } } + .top_detail{ + background-image: url('./image/projectBk1.png'); + background-size: 100% 100%; + flex: 0 0 calc(33.333% - 15px); + padding: 22px 20px 20px 20px; + border-radius:15px; + box-shadow:0px 0px 12px rgba(33, 73, 212, 0.1); + font-family: alibabaReg; + color: #091221; + .topitem{ + background-color: rgba(76, 88, 118, 0.04); + padding: 4px 8px; + border-radius: 4px; + } + .topTitle{ + font-family: alibaba; + font-size: 16px; + } + .pythonicon{ + width: 14px; + height: 14px; + margin-right: 6px; + background-image: url('./image/python_color.png'); + background-position: center; + background-size: 100% 100%; + } + &:hover{ + cursor: pointer; + background-image: url('./image/projectBk4.png'); + span, div{ + color: white; + } + .color5d6:not(.task-hide-2){ + opacity: 0.8; + } + .pd_tag_NSCC li{ + color:#ffffff; + background-color:rgba(255, 255, 255, 0.12); + border: 1px solid rgba(255, 255, 255, 0.5); + } + .topitem{ + background-color: rgba(255, 255, 255, 0.1); + } + .top_tag_NSCC{ + li{ + padding: 0 8px; + border-radius:4px; + margin-right: 8px; + color:#ffffff; + background-color:rgba(255, 255, 255, 0.12); + border: 1px solid rgba(255, 255, 255, 0.5); + } + } + .pythonicon{ + width: 14px; + height: 14px; + margin-right: 6px; + background-image: url('./image/python_white.png'); + background-position: center; + background-size: 100% 100%; + } + } + &.top:hover{ + background-image: url('./image/projectBk4.png'); + } + .top_tag_NSCC{ + li{ + padding: 0 8px; + border-radius:4px; + border: 1px solid transparent; + background:linear-gradient(281.55deg,rgba(10, 145, 255, 0.08) 1.48%,rgba(43, 103, 238, 0.08) 53.53%,rgba(133, 110, 250, 0.08) 95.62%); + margin-right: 8px; + } + } + } + .top_detailBox{ + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + column-gap: 20px; + row-gap: 20px; + } } .source_1_bg_NSCC{ background-image: url('./image/bkImg9.png'); diff --git a/src/forge/Information/api.js b/src/forge/Information/api.js index 9854422f7..e779fa376 100644 --- a/src/forge/Information/api.js +++ b/src/forge/Information/api.js @@ -699,7 +699,7 @@ export function doProjectTop(data) { // 获取文章列表 export function getPointsDocList(id){ return fetch({ - url:`/zone/zoneFront/getTopDoc/${id}`, + url:`/zone/open/getTopDoc/${id}`, method: 'get', }) } @@ -707,7 +707,7 @@ export function getPointsDocList(id){ // 获取文章列表 export function getPointsProjectList(id){ return fetch({ - url:`/zone/zoneFront/getTopProject/${id}`, + url:`/zone/open/getTopProject/${id}`, method: 'get', }) }