diff --git a/src/forge/DevOps/Structure.jsx b/src/forge/DevOps/Structure.jsx
index 45f734bdf..5bfe00621 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 9f1c81c14..bcc27acda 100644
--- a/src/forge/Source/Index.jsx
+++ b/src/forge/Source/Index.jsx
@@ -13,9 +13,9 @@ const sort = [
"按引用排序"
]
const limit = 15;
-const https = 'http://117.50.100.12:8001';
+const https = 'https://testfiles.trustie.net';
function Index(props){
- const [ sortValue , setSortValue ] = useState(1);
+ const [ sortValue , setSortValue ] = useState(0);
const [ page , setPage ] = useState(1);
const [ total , setTotal ] = useState(0);
const [ search , setSearch ] = useState(undefined);
@@ -28,7 +28,7 @@ function Index(props){
if(owner && repo_id){
getData();
}
- },[repo_id,owner,search,sort,page])
+ },[repo_id,owner,search,sortValue,page])
function getData(){
const url = https +`/api/project/achievement/`;
@@ -38,7 +38,7 @@ function Index(props){
curPage:page,
pageSize:limit,
name:search,
- sort:sortValue,
+ sort:sortValue+1,
}
}).then(result=>{
if(result && result.data){
@@ -54,6 +54,7 @@ function Index(props){
// 切换排序方式
function changeSort(e,index){
+ console.log(index);
setSortValue(index);
}
@@ -63,7 +64,7 @@ function Index(props){
{
sort && sort.map((item,key)=>{
return(
- changeSort(e,key+1)} value={key} className={key+1 === sortValue ?"color-blue":""}>{item}
+ changeSort(e,key)} value={key} className={key=== sortValue ?"color-blue":""}>{item}
)
})
}