新一代开源创新服务平台
Gitlink(确实开源)-CCF官网指定的产学研融合面向软件开源创新的开源社区
-
- {
- list.map((i,k)=>{
- return(
-
-
-

-
-
{i.name}
-
{i.company}
+ {
+ list && list.length > 0 ?
+
+ {
+ list.map((i,k)=>{
+ return(
+
+
+

+
+
{i.name}
+
{i.author && i.author.name}
+
-
-
{i.desc}
-
-
{i.look}
-
{i.cloud}
-
{i.type}
-
-
- )
- })
- }
-
+
{i.description}
+
+
{i.visits}
+ {i.category && i.category.id &&
{i.category.name}}
+ {i.language && i.language.id &&
{i.language.name}}
+
+
+ )
+ })
+ }
+
+ :""
+ }
- {
- list.map((i,k)=>{
- return(
-
0 ? "right":"left"} style={{width:`${(120-k*10)}px`,height:`${(120-k*10)}px`}}>{i.company}/{i.name}
- )
- })
- }
+
+
+ {
+ list && list.length > 0 && list.map((i,k)=>{
+ return(
+ k%2 === 0? {i.author && i.author.name}/{i.name} : ""
+ )
+ })
+ }
+
+
+
+
+
+ {
+ list && list.length > 0 && list.map((i,k)=>{
+ return(
+ k%2 > 0 ? {i.author && i.author.name}/{i.name} : ""
+ )
+ })
+ }
+
+
+
diff --git a/src/forge/Main/projecthome/SubList.jsx b/src/forge/Main/projecthome/SubList.jsx
new file mode 100644
index 000000000..b68d9a5db
--- /dev/null
+++ b/src/forge/Main/projecthome/SubList.jsx
@@ -0,0 +1,138 @@
+import React , { useEffect , useState } from 'react';
+import hotAuthor from '../img/index/hotAuthor.png';
+import week from '../img/index/week.png';
+import month from '../img/index/month.png';
+import { Link } from 'react-router-dom';
+import axios from 'axios';
+import { getImageUrl } from 'educoder';
+
+
+function SubList() {
+
+ const [ weekList ,setWeekList ] = useState(undefined);
+ const [ monthList ,setMonthList ] = useState(undefined);
+ const [ authorList ,setAuthorList ] = useState(undefined);
+
+ useEffect(()=>{
+ getList(7);
+ getList(30);
+ getAuthorList(7);
+ },[])
+
+ function getList(time){
+ const url = `/project_rank.json`;
+ axios.get(url,{
+ params:{
+ time
+ }
+ }).then(result=>{
+ if(result && result.data){
+ time === 7 ? setWeekList(result.data.projects) : setMonthList(result.data.projects);
+ }
+ }).catch(error=>{})
+ }
+ function getAuthorList(time){
+ const url = `/user_rank.json`;
+ axios.get(url,{
+ params:{
+ time
+ }
+ }).then(result=>{
+ if(result && result.data){
+ setAuthorList(result.data.users);
+ }
+ }).catch(error=>{})
+ }
+
+ return(
+
+ {
+ authorList && authorList.length > 0?
+
+
本周热门开发者
+
+ {
+ authorList.map((i,k)=>{
+ return(
+
+
+
})
+
+
{i.name}
+
+ {i.project && i.project.name}
+
+
+
+
+ )
+ })
+ }
+
+
+ :""
+ }
+
+ {
+ weekList && weekList.length > 0 ?
+
+
本周热门项目
+
+ {
+ weekList.map((i,k)=>{
+ return(
+
+
+ {k+1}
+ {i.owner && i.owner.name}/{i.name}
+
+ {i.praises}
+
+
+ {i.description &&
+
+ {i.description}
+
+ }
+
+ )
+ })
+ }
+
+
+ :""
+ }
+ {
+ monthList && monthList.length > 0?
+
+
本月热门项目
+
+ {
+ monthList.map((i,k)=>{
+ return(
+
+
+ {i.description &&
+
+ {i.description}
+
+ }
+
+ )
+ })
+ }
+
+
+ :""
+ }
+
+
+ )
+}
+export default SubList;
\ No newline at end of file
diff --git a/src/forge/Main/projecthome/SubUnitBanner.jsx b/src/forge/Main/projecthome/SubUnitBanner.jsx
new file mode 100644
index 000000000..a723b6f12
--- /dev/null
+++ b/src/forge/Main/projecthome/SubUnitBanner.jsx
@@ -0,0 +1,50 @@
+import React from 'react';
+import Hot from '../img/index/hot.png';
+import Slider from "react-slick";
+import huawei from '../img/index/unit/huawei.png';
+import langchao from '../img/index/unit/langchao.png';
+import jijinhui from '../img/index/unit/jijinhui.png';
+import mulan from '../img/index/unit/mulan.png';
+import xigongye from '../img/index/unit/xigongye.png';
+import feiteng from '../img/index/unit/feiteng.png';
+import xiuos from '../img/index/unit/xiuos.png';
+import huake from '../img/index/unit/huake.png';
+
+const settings = {
+ dots: false,
+ infinite: true,
+ slidesToShow: 1,
+ slidesToScroll: 1,
+ vertical: true,
+ verticalSwiping: true,
+ autoplay:true,
+ arrows:false
+};
+
+function SubUnitBanner() {
+ return(
+
+
+
+
精选开源组织
+

+
+
+
+
+
+
+
+ )
+}
+export default SubUnitBanner;
\ No newline at end of file