diff --git a/src/forge/users/Statistics/Index.jsx b/src/forge/users/Statistics/Index.jsx index aca25eb11..6375ac613 100644 --- a/src/forge/users/Statistics/Index.jsx +++ b/src/forge/users/Statistics/Index.jsx @@ -74,21 +74,19 @@ function Index(props) { if(result && result.data){ setRadarData(result.data); let score = result.data.user && result.data.user.each_language_score; - if(score){ - var sortData = []; - for (var item in score) { - sortData.push([item, score[item]]) - } - sortData.sort(function(a, b) { - return b[1] - a[1]; - }); - setTopThree(sortData.slice(0,3)); + var sortData = [] + for (var item in score) { + sortData.push([item, score[item]]) } + sortData.sort(function(a, b) { + return b[1] - a[1]; + }); + setTopThree(sortData.slice(0,3)); let percent = result.data.user && result.data.user.languages_percent; let arr = []; Object.keys(percent).map((item,key)=>{ - arr.push({name:item,p:parseFloat(percent[item]*100).toFixed(1),color:getColor()}); + arr.push({name:item,p:percent[item]*100,color:getColor()}); }) setPercentData(arr); } @@ -128,7 +126,7 @@ function Index(props) { return(
- + 开发能力 -
-

从五个维度刻画你的开发能力:语言能力、影响力、贡献度、活跃度、项目经验,同时可以查看社区平均数据。

- - { - topThree && topThree.length > 0 && -
- - { topThree[1] && } - { topThree[2] && } + + { + topThree && +
+ + + +
+ } + { + percentData && +
+
+ { + percentData.map((i,k)=>{ + return( + + ) + }) + }
- } - { - percentData && -
-
- { - percentData.map((i,k)=>{ - return( - - ) - }) - } -
-
- { - percentData.map((i,k)=>{ - return( - - {i.name} - {`${i.p}%`} - - ) - }) - } -
+
+ { + percentData.map((i,k)=>{ + return( + + {i.name} + {`${i.p}%`} + + ) + }) + }
- } -
+
+ }
- + 角色定位 -
-

根据你在项目开发过程中的工作,对你在项目中扮演的角色进行定位,包括:创建者、管理者、开发者、测试者、文档工作者等。

- -
+
- + 专业定位 -
-

展示你擅长、关注、感兴趣的专业范围,通过你参与项目、收藏项目、关注项目、复刻项目等数据来统计。

- -
+
) diff --git a/src/forge/users/Statistics/Index.scss b/src/forge/users/Statistics/Index.scss index 4ea048bfa..a2f944b90 100644 --- a/src/forge/users/Statistics/Index.scss +++ b/src/forge/users/Statistics/Index.scss @@ -1,5 +1,5 @@ .boxes{ - padding:15px 0px; + padding:20px 30px; .roundBox{ margin:20px auto; display: flex;