统计数改为固定值
This commit is contained in:
parent
363bbeb950
commit
0d11b95492
|
|
@ -64,9 +64,9 @@ function ProjectHomePage(props) {
|
|||
|
||||
function getInitCount() {
|
||||
const obj = {
|
||||
countByGHM: 0,
|
||||
countByGHM: 20000,
|
||||
countByOther: 0,
|
||||
countByGHMType: 0
|
||||
countByGHMType: 10
|
||||
}
|
||||
axios.get(`/organizations/gh_mirrors/projects.json?page=1&limit=15&sort_by=updated_on&sort_direction=desc`).then(result => {
|
||||
if (result && result.data) {
|
||||
|
|
@ -78,8 +78,12 @@ function ProjectHomePage(props) {
|
|||
obj.countByOther = result.data.total_count - obj.countByGHM
|
||||
}
|
||||
}).finally(()=>{
|
||||
cateTopics && cateTopics[39] && (obj.countByGHMType = cateTopics[39].length)
|
||||
setCount(obj);
|
||||
// cateTopics && cateTopics[39] && (obj.countByGHMType = cateTopics[39].length)
|
||||
setCount({
|
||||
countByGHM: 20000,
|
||||
countByOther: obj.countByOther,
|
||||
countByGHMType: 10
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -154,17 +158,17 @@ function ProjectHomePage(props) {
|
|||
</div>
|
||||
<div className="df color-white project_count glass-effect">
|
||||
<div className="center">
|
||||
<p>{countByOther}</p>
|
||||
<p>{countByOther}<span className="font-24">+</span></p>
|
||||
<span className="font-14 opacity80">软件数量</span>
|
||||
</div>
|
||||
<Divider type="vertical" />
|
||||
<div className="center">
|
||||
<p>{countByGHMType}</p>
|
||||
<p>{countByGHMType}<span className="font-24">+</span></p>
|
||||
<span className="font-14 opacity80">支持三方组件类型</span>
|
||||
</div>
|
||||
<Divider type="vertical" />
|
||||
<div className="center">
|
||||
<p>{countByGHM}</p>
|
||||
<p>{countByGHM}<span className="font-24">+</span></p>
|
||||
<span className="font-14 opacity80">三方组件数</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue