forked from Gitlink/forgeplus-react
Merge branch 'feature_news' of https://gitlink.org.cn/durian/forgeplus-react into feature_websiteBuild
This commit is contained in:
commit
2fc5ae9667
|
|
@ -1,5 +1,5 @@
|
|||
import React , { useEffect , useState } from 'react';
|
||||
import { Input , Pagination, Spin } from 'antd';
|
||||
import { Input , Pagination, Spin, Tag } from 'antd';
|
||||
import SourceIcon from '../img/sourceIcon.png';
|
||||
import { Link } from 'react-router-dom';
|
||||
import axios from 'axios';
|
||||
|
|
@ -7,6 +7,7 @@ import { getSourceTypeList , getSourceList , getSourceZoneList } from '../api';
|
|||
import Nodata from '../../Nodata';
|
||||
import ImgGreen from '../img/green_nodata.png';
|
||||
import '../indexZone1.scss';
|
||||
import { FlexAJ } from '../../Component/layout';
|
||||
|
||||
const { Search } = Input;
|
||||
|
||||
|
|
@ -53,7 +54,7 @@ function Source(props){
|
|||
function getLists(){
|
||||
setIsSpin(true);
|
||||
getSourceList({
|
||||
id,pageSize:limit,pageNum:page,typeId:chooseTypeId,domainId:chooseZoneId,name:search
|
||||
id,pageSize:limit,pageNum:page,searchTypeId:chooseTypeId,domainId:chooseZoneId,name:search
|
||||
}).then(response=>{
|
||||
if(response){
|
||||
setSourceList(response.data.rows);
|
||||
|
|
@ -98,7 +99,7 @@ function Source(props){
|
|||
{
|
||||
zoneList.map((i,k)=>{
|
||||
return(
|
||||
<li key={k} onClick={()=>{setChooseZoneId(i.id);window.scrollTo(0,450)}} className={chooseZoneId && chooseZoneId === i.id ? "active":"" }>{i.name}</li>
|
||||
<li key={k} onClick={()=>{setChooseZoneId(i.id);window.scrollTo(0,450)}} className={`${chooseZoneId && chooseZoneId === i.id ? "active":""} task-hide`}>{i.name}</li>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
|
@ -138,12 +139,19 @@ function Source(props){
|
|||
{i.summary}
|
||||
</p>
|
||||
<div className="s_infos">
|
||||
<p className="load_count">
|
||||
<img src={SourceIcon} alt="" width="18px" className="mr5"/><span style={{color:"#5e6685"}}>{i.downloadCount}</span>
|
||||
</p>
|
||||
<FlexAJ>
|
||||
{temp === "zone" && <span className='domainNameBox task-hide'>{i.domainName}</span>}
|
||||
<p className="load_count">
|
||||
<img src={SourceIcon} alt="" width="18px" className="mr5" style={{marginTop: '-4px'}}/><span style={{color:"#5e6685"}}>{i.downloadCount}</span>
|
||||
</p>
|
||||
</FlexAJ>
|
||||
{temp === "zone1" && <p className="load_source">
|
||||
<span>{i.domainName}</span>
|
||||
<span>{i.typeName}</span>
|
||||
{i.zoneResourceTypeList && <span>
|
||||
{i.zoneResourceTypeList.reduce((pre, cur)=>{
|
||||
return pre ? `${pre}, ${cur.name}` : cur.name
|
||||
}, '')}
|
||||
</span>}
|
||||
</p>
|
||||
}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ import { Link } from 'react-router-dom';
|
|||
import axios from 'axios';
|
||||
import { Base64 } from 'js-base64';
|
||||
import { httpUrl } from '../fetch';
|
||||
import { AlignCenter, FlexAJ } from '../../Component/layout';
|
||||
import SourceIcon from '../img/sourceIcon.png';
|
||||
|
||||
|
||||
function SourceDetail(props){
|
||||
|
|
@ -36,7 +38,16 @@ function SourceDetail(props){
|
|||
{
|
||||
detail &&
|
||||
<div className="source_detail_box">
|
||||
<div className="s_d_title">{detail.name}</div>
|
||||
<FlexAJ className="s_d_title">
|
||||
<AlignCenter>
|
||||
<span className='domainNameBoxD font-13 mr15'>{detail.domainName}</span>
|
||||
<span className='font-22'>{detail.name}</span>
|
||||
</AlignCenter>
|
||||
<p className="load_count">
|
||||
<img src={SourceIcon} alt="" width="18px" className="mr5" style={{marginTop: '-4px'}}/><span style={{color:"#5e6685"}}>{detail.downloadCount}</span>
|
||||
</p>
|
||||
</FlexAJ>
|
||||
<div className='pb20'>{detail.summary}</div>
|
||||
{
|
||||
detail.fileList && detail.fileList.length > 0 &&
|
||||
<ul className="files_box">
|
||||
|
|
@ -46,6 +57,7 @@ function SourceDetail(props){
|
|||
<li>
|
||||
<img src={SourceFile} alt="" width="20px" className="mr12"/>
|
||||
<span className="task-hide">{i.fileOriginName}</span>
|
||||
<span>{i.zoneResourceType.name}</span>
|
||||
<span>{i.fileSizeInfo}</span>
|
||||
<a href={`${httpUrl}/file/open/download/${i.fileId}`} download className="f_b_load primaryColor">下载</a>
|
||||
</li>
|
||||
|
|
@ -54,16 +66,6 @@ function SourceDetail(props){
|
|||
}
|
||||
</ul>
|
||||
}
|
||||
|
||||
{ detail.introduction &&
|
||||
<div style={{padding:"20px 0px"}}>
|
||||
<RenderHtml
|
||||
className="source_detail imageLayerParent"
|
||||
value={detail.introduction ? Base64.decode(detail.introduction):""}
|
||||
url={props.history.location}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1380,17 +1380,24 @@
|
|||
margin-bottom: 14px!important;
|
||||
}
|
||||
}
|
||||
.domainNameBox{
|
||||
border:1px solid var(--primary-color);
|
||||
border-radius:2px;
|
||||
height: 28px;
|
||||
padding: 0px 12px;
|
||||
color: var(--primary-color);
|
||||
max-width: 70%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.source_detail_box{
|
||||
background-color: #fff;
|
||||
padding:10px 35px 30px;
|
||||
padding:10px 35px 70px 30px;
|
||||
.s_d_title{
|
||||
padding:25px 0px;
|
||||
border-bottom: 1px dashed rgba(141, 149, 172, 0.27);
|
||||
color:#1f2329;
|
||||
font-size:22px;
|
||||
margin-bottom: 20px!important;
|
||||
}
|
||||
.files_box{
|
||||
|
|
@ -1411,6 +1418,14 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.domainNameBoxD{
|
||||
display: inline-block;
|
||||
border:1px solid var(--primary-color);
|
||||
border-radius:2px;
|
||||
height: 28px;
|
||||
padding: 0px 12px;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
}
|
||||
// 帮助中心
|
||||
.zoneHelpBox{
|
||||
|
|
|
|||
|
|
@ -721,7 +721,7 @@
|
|||
align-items: center;
|
||||
margin-top: 10px;
|
||||
.load_count{
|
||||
margin-right: 10px;
|
||||
margin-right: 100px;
|
||||
min-width: 68px;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue