From ed39cd2945ea2242b2903b8d60af3d75c7c779ee Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Wed, 19 Apr 2023 16:17:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E7=BB=87=E9=A6=96=E9=A1=B5=E6=94=B9?= =?UTF-8?q?=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Team/Index.jsx | 2 +- src/forge/Team/Index.scss | 48 ++++++++++++++- src/forge/Team/List.jsx | 122 ++++++++++++++++++++++++-------------- 3 files changed, 125 insertions(+), 47 deletions(-) diff --git a/src/forge/Team/Index.jsx b/src/forge/Team/Index.jsx index 1a3bfde99..ed5160ca9 100644 --- a/src/forge/Team/Index.jsx +++ b/src/forge/Team/Index.jsx @@ -19,7 +19,7 @@ const New = Loadable({ loading: Loading, }); const DetailIndex = Loadable({ - loader: () => import("./Sub/Detail"), + loader: () => import("./List"), loading: Loading, }); const SubDetailIndex = Loadable({ diff --git a/src/forge/Team/Index.scss b/src/forge/Team/Index.scss index bc16d427e..22f073f85 100644 --- a/src/forge/Team/Index.scss +++ b/src/forge/Team/Index.scss @@ -1,3 +1,47 @@ +.top-orz{ + background-color:#f9fbfe; + box-shadow:0px 8px 20px rgba(17, 35, 146, 0.06); + margin-bottom: 40px; + .box{ + width: 1200px; + display: flex; + margin:0px auto; + align-items: center; + padding:25px 0px 35px; + &>img{ + margin-right: 27px; + // max-width: 140px; + height: 112px; + border-radius:4px; + } + .df{ + display: flex; + align-items: center; + } + .info-orz{ + flex: 1; + .orz-main{ + display: flex; + justify-content: space-between; + width: 100%; + align-items: center; + margin-bottom: 14px!important; + height:30px; + } + .orz-name{ + font-weight:700; + color:#333333; + font-size:22px; + } + .orz-desc{ + color:#4c5b76; + font-size:15px; + line-height:26px; + height: 52px; + } + } + } +} .teamBox{ margin:10px 0px; border:1px solid #eee; @@ -40,9 +84,11 @@ margin:0px auto; padding-top:18px; } -.list{ +.content-orz .list{ display: flex; align-items: flex-start; + width: 1200px; + margin:0px auto; .list-l{ background-color: #fff; max-width: 860px; diff --git a/src/forge/Team/List.jsx b/src/forge/Team/List.jsx index 27e894c8f..7c4a2601e 100644 --- a/src/forge/Team/List.jsx +++ b/src/forge/Team/List.jsx @@ -8,6 +8,7 @@ import Right from './RightBox'; import NoData from '../Nodata'; import CheckProfile from '../Component/ProfileModal/Profile'; import { Menu , Pagination , Dropdown , Spin } from 'antd'; +import { getImageUrl } from 'educoder'; import axios from 'axios'; const limit = 15; @@ -18,9 +19,24 @@ function List(props){ const [ search , setSearch ] = useState(undefined); const [ page , setPage ] = useState(1); const [ sortBy , setSortBy ] = useState("updated_on"); + const [ organizeDetail , setOrganizeDetail ] = useState(undefined); const OIdentifier = props.match.params.OIdentifier; - const organizeDetail = props.organizeDetail; + + useEffect(()=>{ + if(OIdentifier){ + getDetail(OIdentifier); + } + },[OIdentifier]); + + function getDetail(id) { + const url = `/organizations/${id}.json`; + axios.get(url).then(result=>{ + if(result && result.data){ + setOrganizeDetail(result.data); + } + }).catch(error=>{}) + } useEffect(()=>{ if(organizeDetail){ @@ -78,52 +94,68 @@ function List(props){ ) return( -
+ {organizeDetail && organizeDetail.nickname} + {organizeDetail && organizeDetail.is_admin ? + 设置 + :""} +
+