统计数改为固定值

This commit is contained in:
谢思 2025-11-16 21:25:53 +08:00
parent 363bbeb950
commit 0d11b95492
1 changed files with 11 additions and 7 deletions

View File

@ -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>