diff --git a/src/forge/Index.js b/src/forge/Index.js index 0f142470..a3770fcc 100644 --- a/src/forge/Index.js +++ b/src/forge/Index.js @@ -87,7 +87,7 @@ class Index extends Component { ( - + )} > diff --git a/src/forge/Main/Index.js b/src/forge/Main/Index.js index 3b1f66db..b82db46e 100644 --- a/src/forge/Main/Index.js +++ b/src/forge/Main/Index.js @@ -50,7 +50,7 @@ class Index extends Component { this.getCategory(); - this.getRecommand(); + // this.getRecommand(); this.getLanguage(); @@ -304,9 +304,9 @@ class Index extends Component { return (
-

+ {/*

-

+

*/} {/* { recommendOriList && recommendOriList.length>0? @@ -320,7 +320,7 @@ class Index extends Component { :"" } */} - { + {/* { recommendList && recommendList.length>0 && 5 ? "recommandProjects":"recommandProjects mb20"}> { @@ -341,7 +341,7 @@ class Index extends Component { }) } - } + } */}
    diff --git a/src/forge/Main/projecthome/Index.scss b/src/forge/Main/projecthome/Index.scss index 33053c46..ef733067 100644 --- a/src/forge/Main/projecthome/Index.scss +++ b/src/forge/Main/projecthome/Index.scss @@ -65,11 +65,14 @@ line-height: 28px; font-size: 20px; font-weight: 500; - color: #25EBFF; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 250px; + color: #25EBFF; + a{ + color: #25EBFF!important; + } } .company{ height: 20px; @@ -81,6 +84,9 @@ white-space: nowrap; text-overflow: ellipsis; max-width: 250px; + a{ + color: #FFFFFF!important; + } } } .desc{ @@ -370,7 +376,7 @@ .itemTitle{ flex:1; .item-title-infos{ - height: 32px; + height: 22px; display: flex; align-items: center; .infotitle{ @@ -379,7 +385,7 @@ font-size: 15px; font-weight: 600; line-height: 21px; - color: #262626!important; + color: #333!important; &:hover{ color: #466AFF!important; } @@ -393,13 +399,12 @@ } } .item-desc{ - height: 48px; font-size: 14px; font-weight: 400; color: #414141; line-height: 24px; max-width: 548px; - margin-bottom: 10px; + margin: 5px 0px; } .item-data{ font-size: 13px; diff --git a/src/forge/Main/projecthome/SubBanner.jsx b/src/forge/Main/projecthome/SubBanner.jsx index 8bd9a102..7e8c1a63 100644 --- a/src/forge/Main/projecthome/SubBanner.jsx +++ b/src/forge/Main/projecthome/SubBanner.jsx @@ -62,10 +62,10 @@ function SubBanner() { return(
  • - +
    -

    {i.name}

    -

    {i.author && i.author.name}

    +

    {i.name}

    +

    {i.author && i.author.name}

    {i.description}

    diff --git a/src/forge/Main/projecthome/SubList.jsx b/src/forge/Main/projecthome/SubList.jsx index b68d9a5d..56510392 100644 --- a/src/forge/Main/projecthome/SubList.jsx +++ b/src/forge/Main/projecthome/SubList.jsx @@ -56,11 +56,11 @@ function SubList() { return(
  • - +
    {i.name}

    - {i.project && i.project.name} + {i.project && i.project.name}

    @@ -84,7 +84,7 @@ function SubList() {
  • {k+1} - {i.owner && i.owner.name}/{i.name} + {i.owner && i.owner.name}/{i.name} {i.praises} @@ -113,7 +113,7 @@ function SubList() {
  • {k+1} - {i.owner && i.owner.name}/{i.name} + {i.owner && i.owner.name}/{i.name} {i.praises} diff --git a/src/forge/Main/projecthome/SubUnitBanner.jsx b/src/forge/Main/projecthome/SubUnitBanner.jsx index a723b6f1..f3ba16a5 100644 --- a/src/forge/Main/projecthome/SubUnitBanner.jsx +++ b/src/forge/Main/projecthome/SubUnitBanner.jsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React , { useEffect , useState } from 'react'; import Hot from '../img/index/hot.png'; import Slider from "react-slick"; import huawei from '../img/index/unit/huawei.png'; @@ -9,6 +9,9 @@ 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'; +import axios from 'axios'; +import { Link } from 'react-router-dom'; +import { getImageUrl } from 'educoder'; const settings = { dots: false, @@ -20,31 +23,62 @@ const settings = { autoplay:true, arrows:false }; - +const group_size = 6; function SubUnitBanner() { + + const [ list , setlist ] = useState(undefined); + + useEffect(()=>{ + getRecommandOrz(); + },[]) + + function getRecommandOrz(params) { + const url = `/organizations/recommend.json`; + axios.get(url,{ + params:{ + group_size + } + }).then(result=>{ + if(result){ + setlist(result.data.organizations) + } + }).catch(error=>{}) + } return( -
    -
    -
    - 精选开源组织 - + list && list.length > 0 ? +
    +
    +
    + 精选开源组织 + +
    + + { + list.map((i,k)=>{ + return( +
    + { + i.map((j,k1)=>{ + return( + + ) + }) + } +
    + ) + }) + } + {/*
    + + + + +
    */} +
    - -
    - - - - -
    -
    - - - - -
    -
    -
    + :"" + ) } export default SubUnitBanner; \ No newline at end of file