diff --git a/src/forge/DevOps/Structure.jsx b/src/forge/DevOps/Structure.jsx index 45f734bd..5bfe0062 100644 --- a/src/forge/DevOps/Structure.jsx +++ b/src/forge/DevOps/Structure.jsx @@ -58,6 +58,7 @@ function Structure(props,ref){ return { ...item, author:item.author && item.author.name, + image_url:item.author && item.author.image_url, message: { branch: item.branch_target, message: item.message, @@ -244,7 +245,7 @@ function Structure(props,ref){ {meg.sha && {meg.sha}} - +
{meg.message}
diff --git a/src/forge/Source/Index.jsx b/src/forge/Source/Index.jsx index 3ba40678..bcc27acd 100644 --- a/src/forge/Source/Index.jsx +++ b/src/forge/Source/Index.jsx @@ -4,6 +4,7 @@ import { Blueback , FlexAJ } from '../Component/layout'; import { Dropdown, Input , Menu , Pagination } from 'antd'; import { Link } from 'react-router-dom'; import UploadSource from './UploadSource'; +import axios from 'axios'; const { Search } = Input; const sort = [ @@ -12,6 +13,7 @@ const sort = [ "按引用排序" ] const limit = 15; +const https = 'https://testfiles.trustie.net'; function Index(props){ const [ sortValue , setSortValue ] = useState(0); const [ page , setPage ] = useState(1); @@ -19,10 +21,31 @@ function Index(props){ const [ search , setSearch ] = useState(undefined); const [ visible , setVisible ] = useState(false); + const repo_id = props.projectDetail && props.projectDetail.repo_id; + const owner = props.match.params.owner; useEffect(()=>{ + if(owner && repo_id){ + getData(); + } + },[repo_id,owner,search,sortValue,page]) - },[search,sort,page]) + function getData(){ + const url = https +`/api/project/achievement/`; + axios.get(url,{ + params:{ + projectId:repo_id, + curPage:page, + pageSize:limit, + name:search, + sort:sortValue+1, + } + }).then(result=>{ + if(result && result.data){ + + } + }).catch(error=>{}) + } // 搜索 function onSearch(value){ @@ -31,6 +54,7 @@ function Index(props){ // 切换排序方式 function changeSort(e,index){ + console.log(index); setSortValue(index); } @@ -40,7 +64,7 @@ function Index(props){ { sort && sort.map((item,key)=>{ return( - changeSort(e,key)} value={key} className={key === sortValue ?"color-blue":""}>{item} + changeSort(e,key)} value={key} className={key=== sortValue ?"color-blue":""}>{item} ) }) } @@ -55,12 +79,19 @@ function Index(props){ ) + // 上传资源确定 function onOk(){ } + + // 删除标签 + function removeTagFunc(){ + + } + return(
- setVisible(false)} onOk={onOk}/> + setVisible(false)} onOk={onOk} showNotification={props.showNotification}/>
资源库(18) @@ -98,7 +129,7 @@ function Index(props){

资源描述资源描述资源描述资源描述资源描述资源描述资源描述

- 软件版本 + 软件版本