This commit is contained in:
caishi 2023-06-16 11:39:20 +08:00
commit 61fdf536e3
98 changed files with 2651 additions and 361 deletions

View File

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 2340181 */
src: url('iconfont.woff2?t=1682403222759') format('woff2'),
url('iconfont.woff?t=1682403222759') format('woff'),
url('iconfont.ttf?t=1682403222759') format('truetype');
src: url('iconfont.woff2?t=1686823554834') format('woff2'),
url('iconfont.woff?t=1686823554834') format('woff'),
url('iconfont.ttf?t=1686823554834') format('truetype');
}
.iconfont {
@ -13,6 +13,22 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-a-zu2044:before {
content: "\e96d";
}
.icon-cuo:before {
content: "\e96c";
}
.icon-dui:before {
content: "\e96b";
}
.icon-zanting:before {
content: "\e96a";
}
.icon-cangkuyuyanicon:before {
content: "\e962";
}

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,34 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "36020261",
"name": "组 2044",
"font_class": "a-zu2044",
"unicode": "e96d",
"unicode_decimal": 59757
},
{
"icon_id": "5287658",
"name": "错",
"font_class": "cuo",
"unicode": "e96c",
"unicode_decimal": 59756
},
{
"icon_id": "8802648",
"name": "对",
"font_class": "dui",
"unicode": "e96b",
"unicode_decimal": 59755
},
{
"icon_id": "887857",
"name": "暂停",
"font_class": "zanting",
"unicode": "e96a",
"unicode_decimal": 59754
},
{
"icon_id": "34965902",
"name": "仓库语言icon",

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -160,7 +160,7 @@ const Topic = Loadable({
})
// 此处仅维护前端可能的一级路由,不用进行项目或者组织判断的字段。
const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder", "glcc","bindlogin", "softbot","zone"];
const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder", "glcc","bindlogin", "softbot","zone","zone1"];
class App extends Component {
constructor(props) {
@ -388,6 +388,14 @@ class App extends Component {
}
}>
</Route>
<Route
path={"/zone1/:deptId"}
render={
(props) => {
return (<Information {...this.props} {...props} {...this.state} />)
}
}>
</Route>
<Route
path={"/settings"}
render={

View File

@ -132,6 +132,14 @@ export function getUrl(path, goTest) {
return `${path ? path: ''}`;
}
export function getZoneUrl(path) {
let settings = localStorage.chromesetting&&JSON.parse(localStorage.chromesetting);
let actionUrl = settings && settings.common.zone;
return `${actionUrl}${path?path:''}`
}
export function getUrlmys(path, goTest) {
// https://www.educoder.net
// https://testbdweb.trustie.net

View File

@ -4,7 +4,7 @@
export {
getUploadLogoActionUrl as getUploadLogoActionUrl,numFormat as numFormat,
getImageUrl as getImageUrl,getImageUrlAbsolute as getImageUrlAbsolute,getImage as getImage, getmyUrl as getmyUrl, getRandomNumber as getRandomNumber, getUrl as getUrl, publicSearchs as publicSearchs, getRandomcode as getRandomcode, getUrlmys as getUrlmys, getUrl2 as getUrl2, setImagesUrl as setImagesUrl
getImageUrl as getImageUrl,getImageUrlAbsolute as getImageUrlAbsolute,getImage as getImage, getmyUrl as getmyUrl, getRandomNumber as getRandomNumber, getUrl as getUrl, getZoneUrl as getZoneUrl, publicSearchs as publicSearchs, getRandomcode as getRandomcode, getUrlmys as getUrlmys, getUrl2 as getUrl2, setImagesUrl as setImagesUrl
, getUploadActionUrl as getUploadActionUrl, getUploadActionUrltwo as getUploadActionUrltwo, getUploadActionUrlthree as getUploadActionUrlthree, getUploadActionUrlOfAuth as getUploadActionUrlOfAuth
, getTaskUrlById as getTaskUrlById, TEST_HOST, htmlEncode as htmlEncode, getupload_git_file as getupload_git_file, getcdnImageUrl as getcdnImageUrl,
turnbar,returnbar,setSeoMeta as setSeoMeta

View File

@ -0,0 +1,58 @@
import React , { useEffect, useState } from 'react';
import Slider from 'react-slick';
import { Link } from 'react-router-dom';
const settings = {
dots: true,
infinite: false,
speed: 500,
slidesToShow: 3,
slidesToScroll: 3,
arrows: false,
adaptiveHeight: true,
};
function Contributor(props) {
const { personList } = props
const [ showList, setShowList] = useState([]);
function initList() {
if (personList.length !== 3) {
setShowList([].concat(personList, new Array(personList.length % 3 - 1).fill({})))
} else {
setShowList( personList )
}
}
useEffect(()=>{
initList();
},[personList])
return(
<div className="boxmain zone_c_lists pt40">
{
showList && showList.length > 0 ?
<Slider {...settings}>
{
showList.map((i,k)=>{
return(
<div className="container">
{ i.name &&
<div className="c_item">
<Link to={`/${i.login}`}><img src={i.imageUrl} alt="" /></Link>
<div className="c_name task-hide">{i.name}</div>
<p className="c_desc task-hide-2" style={{display:i.introduction?"":"flex"}}>{i.introduction || "暂无~"}</p>
</div>
}
</div>
)
})
}
</Slider>
:""
}
</div>
)
}
export default Contributor;

View File

@ -1,7 +1,7 @@
import React from 'react';
import { Link } from 'react-router-dom';
function Hot({list , title,deptId}){
function Hot({list , title, deptId, temp}){
return(
<div>
<p className="hot_title">{title}</p>
@ -13,7 +13,7 @@ function Hot({list , title,deptId}){
return(
<li>
<span style={{opacity:k<3 ? `${1-((k+1)/10)}` :"0.3"}}>{k+1}</span>
<Link to={`/zone/${deptId}/newdetail/${i.id}`}>{i.name}</Link>
<Link to={`/${temp}/${deptId}/newdetail/${i.id}`}>{i.name}</Link>
</li>
)
})

View File

@ -0,0 +1,79 @@
import React , {forwardRef, useEffect, useState} from 'react';
import { Modal , Form , Input , Button, Icon } from 'antd';
import UploadImage from '../../Team/Component/UploadImage';
import { getImageUrlAbsolute, getZoneUrl } from 'educoder';
const { TextArea } = Input;
function MemberApply(props){
const { getFieldDecorator, validateFields , setFieldsValue } = props.form;
const { current_user, onOk, visible, onCancel } = props
const [imageUrl, setImageUrl] = useState(undefined)
useEffect(()=>{
if (current_user) {
setImageUrl(getImageUrlAbsolute(`/${current_user.image_url}`));
}
},[current_user])
function onSure(){
validateFields((error,values)=>{
if(!error){
values.imageUrl = imageUrl
onOk(values)
}
})
}
const layout = {
labelCol: { span: 5 },
wrapperCol: { span: 18 },
};
return(
<Modal
visible={visible}
title="加入专区会员"
width="650px"
closable={false}
destroyOnClose
footer={
<div className="flexCenterJustify">
<Button className="mr20" type="default" onClick={onCancel}>取消</Button>
<Button type="primary" onClick={onSure}>确定</Button>
</div>
}
centered
>
<div>
<Form {...layout }>
<Form.Item label="会员名称" name="name">
{getFieldDecorator("name", {
initialValue: current_user.nickname,
rules:[{ required:true,message:"请输入申请原因" }]
})(
<Input placeholder="请输入会员名称" maxLength={ 10 } width="220px"/>
)}
</Form.Item>
<Form.Item label="会员头像" name="imageUrl" required>
<UploadImage maxSize={ 5 } getImageUrl={ (url) => setImageUrl(url) } url={ getImageUrlAbsolute(`/${current_user.image_url}`)} action={ getZoneUrl(`/api/cms/common/upload`) } />
</Form.Item>
<Form.Item label="会员简介" name="introduction">
{getFieldDecorator("introduction",{
rules:[{ required:true,message:"请输入会员简介" }]
})(
<TextArea autoSize={{ minRows: 2, maxRows: 6 }} maxLength={ 130 } placeholder="请输入会员简介" width="220px"/>
)}
</Form.Item>
<Form.Item label="申请原因" name="remark">
{getFieldDecorator("remark",{
rules:[{ required:true,message:"请输入申请原因" }]
})(
<TextArea autoSize={{ minRows: 2, maxRows: 6 }} maxLength={ 300 } placeholder="请输入申请原因" width="220px"/>
)}
</Form.Item>
</Form>
</div>
</Modal>
)
}
export default Form.create()(forwardRef(MemberApply));

View File

@ -0,0 +1,50 @@
import React , { useState } from 'react';
function PublicBanner(props){
const [ key , setKey ] = useState("1");
const { deptId } = props.match.params;
const { pathname } = props.history.location;
const { data , adminUrl } = props;
return(
<div className="zone_news">
<p className="in_title mb40">新闻动态</p>
<div className="boxmain" style={{display:"flex"}}>
<div className="zone_new_first">
<img src={newsList[0].headImg || img1} alt="" height="302px" style={{width:"100%",objectFit:"cover"}} className="mb30"/>
<Link to={`/${temp}/${deptId}/newdetail/${newsList[0].id}`} className="zone_n_title task-hide">{newsList[0].name}</Link>
<p className="zone_n_desc task-hide-2">{newsList[0].summary}</p>
<p className="font-13 mt10 flexCenter" style={{color:"#8d95a3"}}>
<img src={shijian} alt="" className="mr3" />
{newsList[0].publishTime}
</p>
<p className="mt15">
<Link to={`/${temp}/${deptId}/newdetail/${newsList[0].id}`} className="color-blue flexCenter zone_btn">查看详情<img src={guideArrow} alt="" width="14px" className="ml3"/></Link>
</p>
</div>
<ul className={`zone_new_three ${newsList.length <4 ? "flexStart" : "spaceeTween"}`}>
{
newsList.map((i,k)=>{
return(
k > 0 && <li>
<Link className="zone_n_title task-hide" to={`/${temp}/${deptId}/newdetail/${i.id}`}>{i.name}</Link>
<p className="zone_n_desc task-hide-2 mt10">{i.summary}</p>
<p className="zone_n_value">
<span className="font-13" style={{color:"#8d95a3"}}>
<img src={shijian} alt="" className="mr3" />
{i.publishTime}
</span>
<Link to={`/${temp}/${deptId}/newdetail/${i.id}`} className="color-blue flexCenter zone_btn">查看详情<img src={guideArrow} alt="" width="14px"/></Link>
</p>
</li>
)
})
}
</ul>
</div>
</div>
)
}
export default newBox;

View File

@ -0,0 +1,85 @@
import React , { useEffect } from 'react';
import Slider from 'react-slick';
import { httpUrl } from '../fetch';
import axios from 'axios';
import { useState } from 'react';
const settings = {
dots: false,
infinite: true,
slidesToShow: 1,
slidesToScroll: 1,
vertical: true,
verticalSwiping: true,
autoplay:true,
arrows:false
};
function Partner(props) {
const [ topics ,setTopics ] = useState(undefined);
const { id, partnerList } = props;
useEffect(()=>{
getUnit(partnerList);
},[id])
function getUnit(array){
const newArray = [];
for(let i = 0; i< array.length;) {
newArray.push(array.slice(i, i += 5));
}
setTopics(newArray)
}
function Init() {
let box = document.getElementById('scrollBox1');
scrollUp();
var myTimer = setInterval(scrollUp, 10);
// container
box.onmouseover = () => {
clearInterval(myTimer);
}
// container
// 6060
box.onmouseout = () => {
myTimer = setInterval(scrollUp, 10);
}
}
function scrollUp() {
let box = document.getElementById('scrollBox1');
if(box){
let con1 = document.getElementById('box1');
if (box.scrollLeft >= con1.clientWidth) {
box.scrollLeft = 0;
} else {
box.scrollLeft++;
}
}
}
return(
<div id={"scrollBox1"}>
{
topics && topics.length>0 ?
<Slider {...settings} className="unitMainSlider">
{
topics.map((i, k)=>{
return(
<div key={ k } className="slickMainline">
{
i.map((j,k1)=>{
return(
<a key={ k1 } href={j.link} target="_blank"><img src={j.logo} alt=""/></a>
)
})
}
</div>
)
})
}
</Slider>
:""
}
</div>
)
}
export default Partner;

View File

@ -0,0 +1,83 @@
import React , { useEffect, useRef, useState } from 'react';
import Slider from 'react-slick';
import projectRight from '../img/projectRight.png';
import projectLeft from '../img/projectLeft.png';
function SampleNextArrow(props) {
const { className, activeSlide, total , onClick } = props;
return (
activeSlide !== (total - 3) && <img src={projectRight} className={`right_arraw ${className}`} onClick={onClick}></img>
);
}
function SamplePrevArrow(props) {
const { className, activeSlide, total , onClick } = props;
return (
activeSlide !== 0 && <img src={projectLeft} className={`left_arraw ${className}`} onClick={onClick}></img>
);
}
function Projects(props) {
const { projectList } = props;
const sliderRef = useRef(null)
const [ activeSlide , setActiveSlide ] = useState(undefined);
const settings = {
className: "center",
centerMode: true,
infinite: false,
centerPadding: "100px",
slidesToShow: 3,
speed: 500,
nextArrow: <SampleNextArrow className="right_arraw" activeSlide={ activeSlide } total={ projectList.length }/>,
prevArrow: <SamplePrevArrow className="left_arraw" activeSlide={ activeSlide } total={ projectList.length }/>,
afterChange: current => { setActiveSlide(current) }
};
useEffect(()=>{
if(sliderRef && projectList && projectList.length > 2){
sliderRef.current.slickNext()
}
},[sliderRef])
return(
<div className={`boxmain ${ projectList.length !== 3 && 'not_three_project' } ${ projectList.length < 3 && 'less_three_project' }`}>
{
projectList && projectList.length > 0 ?
(projectList.length < 3 ?
projectList.map((i,k)=>{
return(
<div className="container">
<div className="zone_p_item">
{i.projectProperties && i.projectProperties.authorImageUrl && <img className="info_img" src={i.projectProperties.authorImageUrl} alt="" /> }
<p className="z_p_title task-hide" onClick={()=>window.open(i.projectURL)}>{i.projectProperties && i.projectProperties.name}</p>
<p className="z_p_desc task-hide-2">{i.projectProperties && i.projectProperties.description ? i.projectProperties.description : "暂无~"}</p>
</div>
</div>
)
})
:
<Slider ref={sliderRef} {...settings}>
{
projectList.map((i,k)=>{
return(
<div className="container">
<div className="zone_p_item">
{i.projectProperties && i.projectProperties.authorImageUrl && <img className="info_img" src={i.projectProperties.authorImageUrl} alt="" /> }
<p className="z_p_title task-hide" onClick={()=>window.open(i.projectURL)}>{i.projectProperties && i.projectProperties.name}</p>
<p className="z_p_desc task-hide-2">{i.projectProperties && i.projectProperties.description ? i.projectProperties.description : "暂无~"}</p>
</div>
</div>
)
})
}
</Slider>
)
:""
}
</div>
)
}
export default Projects;

View File

@ -1,14 +1,8 @@
import React , { useState , useEffect } from 'react';
import { Menu } from 'antd';
import Menu1 from '../img/menu1.png';
import Menu2 from '../img/menu2.png';
import Menu3 from '../img/menu3.png';
import Menu4 from '../img/menu4.png';
import Menu5 from '../img/menu5.png';
import Menu6 from '../img/menu6.png';
import Menu7 from '../img/menu7.png';
import banner from '../img/mainbanner.png'
import { Link } from 'react-router-dom';
import { tempConfig } from '../tempInfo';
@ -17,16 +11,16 @@ function PublicBanner(props){
const { deptId } = props.match.params;
const { pathname } = props.history.location;
const { data , adminUrl } = props;
const temp = props.pathName
useEffect(()=>{
if(pathname){
const info = /\/zone\/[A-Za-z0-9]{0,}\/news/g;
const infodetail = /\/zone\/[A-Za-z0-9]{0,}\/newdetail/g;
const project = /\/zone\/[A-Za-z0-9]{0,}\/projects/g;
const vip = /\/zone\/[A-Za-z0-9]{0,}\/VIP/g;
if(pathname === `/zone/${deptId}`){
const info = /[A-Za-z0-9]{0,}\/news/g;
const infodetail = /[A-Za-z0-9]{0,}\/newdetail/g;
const project = /[A-Za-z0-9]{0,}\/projects/g;
const vip = /[A-Za-z0-9]{0,}\/VIP/g;
if(pathname === `/${temp}/${deptId}`){
setKey("1");
}
else if(project.test(pathname)){
@ -52,13 +46,13 @@ function PublicBanner(props){
}
<div className="bannerMenus">
<Menu mode={"horizontal"} selectedKeys={[key]}>
<Menu.Item key={"1"}><Link to={`/zone/${deptId}`}><img src={Menu1} alt="" width="29px"/>首页</Link></Menu.Item>
<Menu.Item key={"2"}><Link to={`/zone/${deptId}/projects`}><img src={Menu2} alt="" width="34px"/>开源项目</Link></Menu.Item>
<Menu.Item key={"1"}><Link to={`/${temp}/${deptId}`}><img src={require(`../img/${temp}Menu1.png`)} alt="" width="29px"/>首页</Link></Menu.Item>
<Menu.Item key={"2"}><Link to={`/${temp}/${deptId}/projects`}><img src={require(`../img/${temp}Menu2.png`)} alt="" width="34px"/>开源项目</Link></Menu.Item>
{/* <Menu.Item key={"3"}><img src={Menu3} alt="" width="33px"/>资源发布</Menu.Item> */}
<Menu.Item key={"4"}><Link to={`/zone/${deptId}/news`}><img src={Menu4} alt="" width="32px"/>领域资讯</Link></Menu.Item>
<Menu.Item key={"4"}><Link to={`/${temp}/${deptId}/news`}><img src={require(`../img/${temp}Menu4.png`)} alt="" width="32px"/>{ tempConfig[temp].mainTitle }</Link></Menu.Item>
{/* <Menu.Item key={"5"}><img src={Menu5} alt="" width="27px"/>Sig小组</Menu.Item> */}
<Menu.Item key={"6"}><Link to={`/zone/${deptId}/VIP`}><img src={Menu6} alt="" width="36px"/>专区会员</Link></Menu.Item>
{ adminUrl && <Menu.Item key={"7"}><a onClick={()=>{window.location.href=adminUrl}}><img src={Menu7} alt="" width="34px"/>后台管理</a></Menu.Item> }
<Menu.Item key={"6"}><Link to={`/${temp}/${deptId}/VIP`}><img src={require(`../img/${temp}Menu6.png`)} alt="" width="36px"/>{ tempConfig[temp].member }</Link></Menu.Item>
{ adminUrl && <Menu.Item key={"7"}><a onClick={()=>{window.location.href=adminUrl}}><img src={require(`../img/${temp}Menu7.png`)} alt="" width="34px"/>后台管理</a></Menu.Item> }
</Menu>
</div>
</div>

View File

@ -1,27 +1,35 @@
import React,{ useState, useEffect } from 'react';
import img1 from '../img/img1.png';
import img2 from '../img/img2.png';
import { httpUrl } from '../fetch';
import guideArrow from '../img/guideArrow.png';
import { Link } from 'react-router-dom';
import shijian from '../img/shijian.png';
import { getHomePageList , gethomePageDocList , getAllList } from '../api';
import axios from 'axios';
import Nodata from '../../Nodata';
import Partner from '../Component/partner';
function HeaderPage(props){
const [ projectList , setProjectList ] = useState(undefined);
const [ personList , setPersonList ] = useState(undefined);
const [ newsList, setNewsList ] = useState(undefined);
const [ partnerList, setParterList ] = useState(undefined);
const { deptId } = props.match.params;
const { data, id } = props;
const temp = props.pathName
useEffect(()=>{
if(id){
getProjectList();
getNewsList();
getPersonList();
getPartnerList();
}
},[id])
function getPersonList(){
getHomePageList(id).then(result=>{
const url = `${httpUrl}/zone/open/${id}/member/homePageList`;
axios.get(url).then(result=>{
if(result){
setPersonList(result.data.rows);
}
@ -29,7 +37,8 @@ function HeaderPage(props){
}
function getNewsList(){
gethomePageDocList(id).then(result=>{
const url = `${httpUrl}/cms/doc/open/zone/${id}/homePageDocList`;
axios.get(url).then(result=>{
if(result){
setNewsList(result.data.rows);
}
@ -37,58 +46,73 @@ function HeaderPage(props){
}
function getProjectList(){
getAllList(id,{isHomepage:1}).then(result=>{
const url = `${httpUrl}/zone/open/${id}/project/list`;
axios.get(url,{params:{
isHomepage:1
}}).then(result=>{
if(result){
setProjectList(result.data.rows);
}
}).catch(console.error())
}
function getPartnerList(){
const url = `${httpUrl}/zone/open/${id}/partners/list`;
axios.get(url).then(result=>{
if(result){
console.log(result)
setParterList(result.data.rows);
}
}).catch(error=>{})
}
return(
<div className="zone_box">
{data && <p className="in_title">{data.firstTitle}</p> }
{
//
data && (data.introductionTitle || data.introductionContent || data.introductionImage) &&
<div className="boxmain zone_infos">
<div className="zone_infos_desc">
{data.introductionTitle && <p className="z_name">{data.introductionTitle}</p>}
<p className="z_desc task-hide-2" style={{WebkitLineClamp:data.introductionTitle?"4":"7"}}>{data.introductionContent}</p>
<p className="z_name">{data.introductionTitle}</p>
<p className="z_desc task-hide-2">{data.introductionContent}</p>
</div>
{
data.introductionImage &&
<img src={data.introductionImage} alt="" height="277px"/>
<img src={data.introductionImage} alt="" width="474px" height="277px"/>
}
</div>
}
{
newsList && newsList.length>0 &&
//
data && data.cmsShow === 1 && newsList && newsList.length>0 &&
<div className="zone_news">
<p className="in_title mb40">新闻动态</p>
<p className="in_title mb40">{ data.homepageCmsTitle }</p>
<div className="boxmain" style={{display:"flex"}}>
<div className="zone_new_first">
<img src={newsList[0].headImg || img1} alt="" height="302px" style={{width:"100%",objectFit:"cover"}} className="mb30"/>
<Link to={`/zone/${deptId}/newdetail/${newsList[0].id}`} className="zone_n_title task-hide">{newsList[0].name}</Link>
<Link to={`/${temp}/${deptId}/newdetail/${newsList[0].id}`} className="zone_n_title task-hide">{newsList[0].name}</Link>
<p className="zone_n_desc task-hide-2">{newsList[0].summary}</p>
<p className="font-13 mt10 flexCenter" style={{color:"#8d95a3"}}>
<img src={shijian} alt="" className="mr3" />
{newsList[0].publishTime}
</p>
<p className="mt15">
<Link to={`/zone/${deptId}/newdetail/${newsList[0].id}`} className="color-blue flexCenter zone_btn">查看详情<img src={guideArrow} alt="" width="14px" className="ml3"/></Link>
<Link to={`/${temp}/${deptId}/newdetail/${newsList[0].id}`} className="color-blue flexCenter zone_btn">查看详情<img src={guideArrow} alt="" width="14px" className="ml3"/></Link>
</p>
</div>
<ul className={`zone_new_three ${newsList.length <4 ? "flexStart" : "spaceeTween"}`}>
{
newsList.map((i,k)=>{
return(
k > 0 && <li>
<Link className="zone_n_title task-hide" to={`/zone/${deptId}/newdetail/${i.id}`}>{i.name}</Link>
k > 0 && <li key={ k }>
<Link className="zone_n_title task-hide" to={`/${temp}/${deptId}/newdetail/${i.id}`}>{i.name}</Link>
<p className="zone_n_desc task-hide-2 mt10">{i.summary}</p>
<p className="zone_n_value">
<span className="font-13" style={{color:"#8d95a3"}}>
<img src={shijian} alt="" className="mr3" />
{i.publishTime}
</span>
<Link to={`/zone/${deptId}/newdetail/${i.id}`} className="color-blue flexCenter zone_btn">查看详情<img src={guideArrow} alt="" width="14px"/></Link>
<Link to={`/${temp}/${deptId}/newdetail/${i.id}`} className="color-blue flexCenter zone_btn">查看详情<img src={guideArrow} alt="" width="14px"/></Link>
</p>
</li>
)
@ -98,15 +122,17 @@ function HeaderPage(props){
</div>
</div>
}
<div className="zone_projects">
<p className="in_title mb40">精选项目</p>
{
projectList && projectList.length>0&&
//
data && data.projectShow === 1 && projectList && projectList.length>0 &&
<div className="zone_projects">
<p className="in_title mb40">{ data.homepageProjectTitle }</p>
{
<div className="boxmain zone_p_lists">
{
projectList.map((i,k)=>{
return(
<li>
<li key={ k }>
<div className="imgBox">{i.projectProperties && i.projectProperties.authorImageUrl && <img src={i.projectProperties.authorImageUrl} alt="" /> }</div>
<div className="infosBox">
<a onClick={()=>window.open(i.projectURL)} className="z_p_title task-hide">{i.projectProperties && i.projectProperties.name}</a>
@ -119,15 +145,18 @@ function HeaderPage(props){
</div>
}
</div>
<div className="zone_contributor">
<p className="in_title">核心贡献者</p>
}
{
//
data && data.memberShow === 1 && personList && personList.length > 0 &&
<div className="zone_contributor">
<p className="in_title">{ data.homepageMemberTitle }</p>
{
personList && personList.length > 0 &&
<ul className="boxmain zone_c_lists">
{
personList.map((i,k)=>{
return(
<li>
<li key={ k }>
<Link to={`/${i.login}`}><img src={i.imageUrl} alt="" /></Link>
<span>{i.name}</span>
<p className="task-hide-2" style={{display:i.introduction?"":"flex"}}>{i.introduction || "暂无~"}</p>
@ -138,29 +167,17 @@ function HeaderPage(props){
</ul>
}
</div>
}
{/* <div className="zone_parter">
<p className="in_title">合作伙伴</p>
<ul className="boxmain zone_part_lists">
<li>合作伙伴一</li>
<li>合作伙伴一</li>
<li>合作伙伴一</li>
<li>合作伙伴一</li>
<li>合作伙伴一</li>
<li>合作伙伴一</li>
<li>合作伙伴一</li>
<li>合作伙伴一</li>
<li>合作伙伴一</li>
<li>合作伙伴一</li>
<li>合作伙伴一</li>
<li>合作伙伴一</li>
<li>合作伙伴一</li>
<li>合作伙伴一</li>
<li>合作伙伴一</li>
<li>合作伙伴一</li>
<li>合作伙伴一</li>
</ul>
</div> */}
{
//
data && data.partnersShow === 1 && partnerList && partnerList.length > 0 &&
<div className="zone_parter">
<p className="in_title">{ data.homepagePartnersTitle }</p>
<Partner id={ id } partnerList={ partnerList }></Partner>
</div>
}
</div>
)
}

View File

@ -0,0 +1,292 @@
import React,{ useState, useEffect } from 'react';
import { httpUrl } from '../fetch';
import img1 from '../img/img1.png';
import img2 from '../img/img2.png';
import vision0 from '../img/vision0.png';
import vision1 from '../img/vision1.png';
import vision2 from '../img/vision2.png';
import vision3 from '../img/vision3.png';
import intro1 from '../img/intro1.png';
import intro2 from '../img/intro2.png';
import intro3 from '../img/intro3.png';
import intro4 from '../img/intro4.png';
import guideArrow from '../img/guideArrow1.png';
import ra from '../img/ra.png'
import title from '../img/title.png'
import { Link } from 'react-router-dom';
import shijian from '../img/shijian.png';
import axios from 'axios';
import Nodata from '../../Nodata';
import Projects from '../Component/projects';
import Contributor from '../Component/contributor';
import Partner from '../Component/partner';
import '../indexZone1.scss'
function HeaderPage(props){
const [ projectList , setProjectList ] = useState(undefined);
const [ personList , setPersonList ] = useState(undefined);
const [ newsList, setNewsList ] = useState(undefined);
const [ partnerList, setParterList ] = useState(undefined);
const { deptId } = props.match.params;
const { data, id } = props;
const temp = props.pathName
const vision = [
{imageUrl: vision0, title: '促进技术创新和应用', content: '通过开源硬件社区的建设,可以让更多的人参与到硬件开发中来,激发大众的创造力和创新精神,从而推动硬件领域的技术创新和实际应用。'},
{imageUrl: vision1, title: '降低硬件开发成本', content: '通过共享开源硬件设计和资源,可以帮助个人和小型企业降低硬件开发的成本,打破品牌垄断,促进市场竞争。'},
{imageUrl: vision2, title: '推广教育和普及知识', content: '通过开源硬件社区的建设,可以提供更多的硬件开发教育和知识普及资源,为学生、教师和爱好者等不同群体提供更多的学习机会和平台。'},
{imageUrl: vision3, title: '加强国际合作和交流', content: '开源硬件社区可以促进国内外的交流和合作,扩大中国在全球开源硬件领域的影响力,推动中外企业和机构之间的技术合作和交流。'}
]
const communityInfo = [
{ level: '普通用户', todo: '寻找项目或SIG组' },
{ level: '项目贡献者', todo: '参与项目贡献' },
{ level: '项目开发者', todo: '推动项目发展' },
{ level: '项目管理者', todo: '成为项目领军人物' }
]
const growPathInfo = [
{ type: '计划一', plan: '保留chisel语言学习学习' },
{ type: '计划二', plan: '小核、SoC快速开发初级、中级、高级' },
{ type: '计划三', plan: '果壳项目(初级、中级、高级)' },
{ type: '计划四', plan: '香山贡献参与' }
]
const introDetail = [
{ title: '能力阶梯', icon: intro1, desc: '成长体系按照开发者从⼊门到进阶再到⾹⼭顶级项⽬设⽴了⽤户能⼒提升的阶梯式真实项⽬' },
{ title: '贡献分级', icon: intro2, desc: '所有开源项⽬全部为开芯院开源开放的真实项⽬开发者参与开源项⽬的所有贡献将作为成长等级、知产授权、加⼊⾼级别项⽬悬赏、获得offer等、成为核⼼贡献者的参与 依据' },
{ title: '成长认证', icon: intro3, desc: '开发者可以通过完成开源项⽬对应的任务赢取对应能⼒成长认证开源项⽬对应的⾼级任务将获得对应等级L2或⾼级别的知识产权授权同时解锁下⼀级别成长任务' },
{ title: '顶级认证', icon: intro4, desc: '参与顶级项⽬“⾹⼭”的贡献者将获得中国科学院计算技术研究所副所长、研究员北京开源芯⽚研究院⾸席科学家RISC-V国际基⾦会理事会成员包云岗签名贡献者证书' }
]
useEffect(()=>{
if(id){
getProjectList();
getNewsList();
getPersonList();
getPartnerList();
}
},[id])
function getPersonList(){
const url = `${httpUrl}/zone/open/${id}/member/homePageList`;
axios.get(url).then(result=>{
if(result){
setPersonList(result.data.rows);
}
}).catch(error=>{})
}
function getNewsList(){
const url = `${httpUrl}/cms/doc/open/zone/${id}/homePageDocList`;
axios.get(url).then(result=>{
if(result){
setNewsList(result.data.rows);
}
}).catch(error=>{})
}
function getProjectList(){
const url = `${httpUrl}/zone/open/${id}/project/list`;
axios.get(url,{params:{
isHomepage:1
}}).then(result=>{
if(result){
if (result.data.rows.length < 3) {
setProjectList(result.data.rows)
} else {
setProjectList([...result.data.rows, {}]);
}
}
}).catch(console.error())
}
function getPartnerList(){
const url = `${httpUrl}/zone/open/${id}/partners/list`;
axios.get(url).then(result=>{
if(result){
setParterList(result.data.rows);
}
}).catch(error=>{})
}
return(
<div className="zone1_box">
{
//
data && (data.introductionTitle || data.introductionContent || data.introductionImage) &&
<div className="boxmain zone_infos mb30">
<div className="zone_infos_desc">
<p className="z_name">{data.introductionTitle}</p>
<p className="z_desc task-hide-2">{data.introductionContent}</p>
</div>
{
data.introductionImage &&
<img src={data.introductionImage} alt="" width="600px" height="361px"/>
}
</div>
}
<div className="zone_vision pt40 pb60">
<p className="in_title mb40">宗旨及愿景</p>
<div className='boxmain'>
{
vision.map((i, k) => {
return (
<div className="vision_item">
<div className="vision_icon">
<img src={i.imageUrl} alt="" />
</div>
<p className="vision_title">{ i.title }</p>
<p className="vision_content">{ i.content }</p>
</div>
)
})
}
</div>
</div>
{
//
data && data.cmsShow === 1 && newsList && newsList.length>0 &&
<div className="zone_news">
<div className="boxmain" style={{display:"flex"}}>
<p className="news_title">{ data.homepageCmsTitle }</p>
<div className="zone_new_first">
<p className="task-hide">
<span className="item_index">1</span>
<Link to={`/${temp}/${deptId}/newdetail/${newsList[0].id}`} className="new_first_title task-hide">{newsList[0].name}</Link>
</p>
<p className="new_first_desc mt20 task-hide-2">{newsList[0].summary}</p>
<p className="font-13 zone_n_value mt20" style={{color:"#8d95a3"}}>
<span className="flexCenter">
<img src={shijian} alt="" className="mr3" />
{newsList[0].publishTime}
</span>
<Link to={`/${temp}/${deptId}/newdetail/${newsList[0].id}`} className="zone_btn">查看更多<img src={guideArrow} alt="" width="14px" className="ml3"/></Link>
</p>
</div>
<ul className="zone_new_three">
{
newsList.map((i,k)=>{
return(
k > 0 &&
<Link to={`/${temp}/${deptId}/newdetail/${i.id}`}>
<li className="new_item">
<p className="task-hide">
<span className="item_index">{k + 1}</span>
<Link className="zone_n_title" to={`/${temp}/${deptId}/newdetail/${i.id}`}>{i.name}</Link>
</p>
<p className="zone_n_desc task-hide-2">{i.summary}</p>
<p className="zone_n_value">
<span className="font-13 flexCenter" style={{color:"#8d95a3"}}>
<img src={shijian} alt="" className="mr3" />
{i.publishTime}
</span>
<span className="flexCenter zone_btn">查看详情<img src={guideArrow} alt="" width="14px"/></span>
</p>
</li>
</Link>
)
})
}
</ul>
</div>
</div>
}
{
//
data && data.projectShow === 1 && projectList && projectList.length > 0 &&
<div className="zone_projects pt50 pb30">
<p className="in_title mb40">{ data.homepageProjectTitle }</p>
<Projects projectList={projectList}></Projects>
</div>
}
{
//
data && data.memberShow === 1 && personList && personList.length > 0 &&
<div className="zone_contributor">
<p className="in_title">{ data.homepageMemberTitle }</p>
<Contributor personList={personList}></Contributor>
</div>
}
<div className="zone_community pt60 pb60">
<p className="in_title mb20">参与社区</p>
<p className="sub_title mb50"><img src={ra} alt="" className="mr5" />成为社区成员尽情发挥您的创意</p>
<div className="c_role boxmain">
{
communityInfo.map(i => {
return (
<div className="c_role_item">
<p className="role_level">{ i.level }</p>
<p className="role_todo">{ i.todo }</p>
<div className="dot"></div>
</div>
)
})
}
</div>
<div className="dot_line"></div>
</div>
<div className="zone_grow pt60 pb60">
{/* <p className="in_title mb20">开源芯<b>⽚⽤</b>户成长体系介绍</p> */}
<p className="in_title mb20"><img src={ title } alt="" /></p>
<p className="sub_title">参与开源芯的开发者需要签署开源贡献者协议</p>
<p className="sub_title mb50">建议开发者按照开源项成长路径进参与稳步提升能降低跳级参与带来的挑战</p>
<div className="grow_path boxmain">
{
growPathInfo.map((i, k) => {
return (
<div className="grow_path_item">
{ k % 2 === 1 && <div className="dot"></div> }
<div className="grow_path_type">
<div></div>
<div></div>
<div></div>
{ i.type }
</div>
<p className="grow_path_plan">{ i.plan }</p>
{ k % 2 === 0 && <div className="dot"></div> }
</div>
)
})
}
</div>
<div className="line"></div>
<div className="grow_introduction boxmain pt40">
{
introDetail.map(i => {
return (
<div className="intro_item">
<p className="intro_title">
<img src={i.icon} alt="" className="mr3" />
{ i.title }
</p>
<p className="intro_desc">{ i.desc }</p>
</div>
)
})
}
</div>
<div className="dot_line"></div>
</div>
<div className="zone_communicate">
<p className="in_title">集萃群智经验 交流心得体会</p>
<button onClick={() => { window.location.href = 'https://forum.gitlink.org.cn/forums/theme/135' }}>立即加入</button>
</div>
{
//
data && data.partnersShow === 1 && partnerList && partnerList.length > 0 &&
<div className="zone_parter">
<p className="in_title">{ data.homepagePartnersTitle }</p>
<Partner id={ id } partnerList={ partnerList }></Partner>
</div>
}
</div>
)
}
export default HeaderPage;

View File

@ -10,7 +10,8 @@ import shijian from '../img/shijian.png';
import liulan from '../img/liulan.png';
import emptydata from '../../Images/nodata.png';
import DefaultImg from '../Component/defaultImg';
import { getNewsAllList , getNewsHotList } from '../api';
import { httpUrl } from '../fetch';
import { tempConfig } from '../tempInfo';
function Main(props){
const [ key , setKey ] = useState("1");
@ -19,23 +20,39 @@ function Main(props){
const [ menuH , setMenuH ] = useState(true);
const [ hotList , setHotList ] = useState(undefined);
const [ isSpin , setIsSpin ] = useState(true);
const [ newCateId , setNewCateId ] = useState(undefined);
const { deptId , cateId } = props.match.params;
const { id } = props;
const temp = props.pathName
useEffect(()=>{
if(id) {
setIsSpin(true);
if (temp === 'zone') {
getMainList();
} else {
getCateList();
}
getHotList();
}
},[id])
useEffect(() => {
if (newCateId) {
getSubHotList()
}
}, [newCateId])
function getMainList(){
getNewsAllList(id).then(result=>{
const url = `${httpUrl}/cms/doc/open/zone/${id}/docOverviewList`;
axios.get(url).then(result=>{
if(result){
let rows = result.data.rows;
setMainList(rows);
if (temp !== 'zone') {
selectCate(rows[0].id)
}
setTimeout(() => {
let ele = document.getElementById("menus");
if(ele){
@ -48,9 +65,24 @@ function Main(props){
}).catch(error=>{})
}
function getCateList() {
const url = `${httpUrl}/cms/doc/open/zone/${id}/dirList`;
axios.get(url).then(result=>{
if(result){
let rows = result.data.rows;
setMainList(rows);
if (temp !== 'zone') {
selectCate(rows[0].id)
}
setIsSpin(false);
}
}).catch(error=>{})
}
function getHotList(){
getNewsHotList(id,{
pageSize:15,pageNum:1
const url = `${httpUrl}/cms/doc/open/zone/${id}/hotDocList`;
axios.get(url,{
params:{pageSize:15,pageNum:1}
}).then(result=>{
if(result){
setHotList(result.data.rows);
@ -58,23 +90,54 @@ function Main(props){
}).catch(error=>{})
}
function getSubHotList() {
const url = `${httpUrl}/cms/doc/open/dir/${newCateId}/hotDocList`;
axios.get(url,{
params:{pageSize:15,pageNum:1}
}).then(result=>{
if(result){
setHotList(result.data.rows);
}
}).catch(error=>{})
}
function selectCate(id) {
setNewCateId(id)
props.history.push(`/${temp}/${deptId}/news/${id}`)
}
return(
<div>
<div className="main_content">
<div className="boxmain">
<p className="in_title">领域资讯</p>
<p className="in_title">{ tempConfig[temp].mainTitle }</p>
{
mainList && mainList.length>0 &&
(
temp === 'zone' ?
<Menu mode={"horizontal"} id="menus" selectedKeys={[cateId||"0"]} style={{justifyContent:menuH?"flex-start":"center"}}>
<Menu.Item key={"0"}><Link to={`/zone/${deptId}/news`}>全部</Link></Menu.Item>
<Menu.Item key={"0"}><Link to={`/${temp}/${deptId}/news`}>全部</Link></Menu.Item>
{
mainList.map((i,k)=>{
return(
<Menu.Item key={`${i.id}`}><Link to={`/zone/${deptId}/news/${i.id}`}>{i.name}</Link></Menu.Item>
<Menu.Item key={`${i.id}`}><Link to={`/${temp}/${deptId}/news/${i.id}`}>{i.name}</Link></Menu.Item>
)
})
}
</Menu>
:
<div className="main_tag">
{
mainList.map((i,k)=>{
if (k <= 4) {
return(
<div className={`main_tag_item task-hide ${newCateId === i.id ? 'main_tag_selected' : ''}`} key={`${i.id}`} onClick={() => selectCate(i.id)} >{i.name}</div>
)
}
})
}
</div>
)
}
{
!mainList && <div style={{height:105}}><Skeleton /></div>
@ -143,7 +206,7 @@ function Main(props){
{
hotList && hotList.length>0 &&
<div className="short_width radius4">
<Hot title={"热门资讯"} list={hotList} deptId={deptId}/>
<Hot temp={ temp } title={ tempConfig[temp].hotTitle } list={hotList} deptId={deptId}/>
</div>
}
</Box>

View File

@ -4,13 +4,15 @@ import liulan from '../img/liulan.png';
import RenderHtml from '../../../components/render-html';
import { Base64 } from 'js-base64';
import axios from 'axios';
import { getNewsDetail } from '../api';
import { httpUrl } from '../fetch';
import { tempConfig } from '../tempInfo';
function NewsDetail(props){
const { deptId , id } = props.match.params;
const [ detail , setDetail ] = useState(undefined);
const [ cmsDir , setCmsDir ] = useState(undefined);
const [ content , setContent]=useState(undefined);
const temp = props.pathName
useEffect(()=>{
if(id){
@ -20,7 +22,8 @@ function NewsDetail(props){
},[id])
function getDetails(){
getNewsDetail(id).then(result=>{
const url = `${httpUrl}/cms/doc/open/${id}`;
axios.get(url).then(result=>{
if(result){
let data = result.data.data;
setDetail(data);
@ -35,8 +38,8 @@ function NewsDetail(props){
detail &&
<div style={{width:'1200px',margin:"0px auto",padding:"30px 0px"}}>
<Breadcrumb separator=">">
<Breadcrumb.Item href={`/zone/${deptId}/news`}>领域资讯</Breadcrumb.Item>
{ cmsDir && <Breadcrumb.Item href={`/zone/${deptId}/news/${cmsDir.id}`}>{cmsDir.name}</Breadcrumb.Item> }
<Breadcrumb.Item href={`/${temp}/${deptId}/news`}>{tempConfig[temp].mainTitle}</Breadcrumb.Item>
{ cmsDir && <Breadcrumb.Item href={`/${temp}/${deptId}/news/${cmsDir.id}`}>{cmsDir.name}</Breadcrumb.Item> }
<Breadcrumb.Item>正文</Breadcrumb.Item>
</Breadcrumb>
<div className="info_text">

View File

@ -8,6 +8,7 @@ import shijian from '../img/shijian.png';
import liulan from '../img/liulan.png';
import DefaultImg from '../Component/defaultImg';
import emptydata from '../../Images/nodata.png';
import nodata from '../img/nodata.png';
import { Link } from 'react-router-dom';
import { httpUrl } from '../fetch';
@ -22,6 +23,7 @@ function NewsList(props){
const [ details , setDetails ] = useState(undefined);
const [ menuSpin , setMenuSpin ] = useState(true);
const { id } = props;
const temp = props.pathName
useEffect(()=>{
@ -31,11 +33,11 @@ function NewsList(props){
}
},[id,cateId,pageNum])
useEffect(()=>{
if(pageNum){
window.scrollTo(0,400);
}
},[pageNum])
// useEffect(()=>{
// if(pageNum){
// window.scrollTo(0,400);
// }
// },[pageNum])
function getColumnDetail(){
@ -119,7 +121,7 @@ function NewsList(props){
mainList && mainList.length>0 &&
mainList.map((i,k)=>{
return(
<div className="main_card_item" onClick={()=>{props.history.push(`/zone/${deptId}/newdetail/${i.id}`)}} key={k}>
<div className="main_card_item" onClick={()=>{props.history.push(`/${temp}/${deptId}/newdetail/${i.id}`)}} key={k}>
{
i.headImg ?
<img src={i.headImg} alt=""/>
@ -127,7 +129,7 @@ function NewsList(props){
<DefaultImg name="GitLink" title={details && details.name} />
}
<div style={{flex:1,width:0}}>
<Link to={`/zone/${deptId}/newdetail/${i.id}`} className={`sub_name task-hide`}>{i.name}</Link>
<Link to={`/${temp}/${deptId}/newdetail/${i.id}`} className={`sub_name task-hide`}>{i.name}</Link>
<p className={`sub_desc task-hide-2`}>
{i.summary}
</p>
@ -143,7 +145,7 @@ function NewsList(props){
{
mainList && mainList.length === 0 &&
<div style={{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",height:500}}>
<img src={emptydata} alt="" width="300"/>
<img src={ temp === 'zone1' ? nodata : emptydata } alt="" width="300"/>
<p className="font-15 color-grey-6 mt20">暂无数据~</p>
</div>
}

View File

@ -5,7 +5,9 @@ import { Input , Menu , Pagination , Spin } from 'antd';
import { Link } from 'react-router-dom';
import Nodata from '../../Nodata';
import axios from 'axios';
import { getProjectsLists , getProjectsTypeLists } from '../api';
import { httpUrl } from '../fetch';
import nodata from '../img/nodata.png';
const { Search } = Input;
function ProjectSource(props){
@ -20,6 +22,7 @@ function ProjectSource(props){
const [ value , setValue ] = useState(undefined);
const [ loading , setLoading ] = useState(false);
const { id } = props;
const temp = props.pathName
useEffect(()=>{
if(id){
@ -35,11 +38,14 @@ function ProjectSource(props){
},[id,typeId,page,searchName])
function getLists(){
getProjectsLists(id,{
const url = `${httpUrl}/zone/open/${id}/project/list`;
axios.get(url,{
params:{
pageNum:page,
name:searchName,
pageSize,
projectTypeId:typeId===0?undefined:typeId
}
}).then(result=>{
if(result){
setLists(result.data.rows);
@ -49,14 +55,15 @@ function ProjectSource(props){
}).catch(error=>{})
}
function getTypeList(){
getProjectsTypeLists(id).then(result=>{
const url = `${httpUrl}/zone/open/${id}/projectType/list`;
axios.get(url).then(result=>{
if(result){
setTypeList(result.data.rows);
}
}).catch(error=>{})
}
const menu = (
<Menu>
<Menu.Item>更新时间排序</Menu.Item>
@ -77,6 +84,7 @@ function ProjectSource(props){
{/* <Banner {...props}/> */}
<div className="boxmain" style={{paddingTop:"56px"}}>
<p className="in_title">开源项目</p>
{ temp === 'zone1' && <p className="project_sub_title">聚合开源特色项目搭建硬件开源服务桥梁</p> }
<Box>
<ul className="in_pro_menu">
<li className="u_t"><i className="iconfont icon-muluicon font-15 mr10 mt2" style={{color:"#1f2329"}} />项目分类</li>
@ -146,8 +154,9 @@ function ProjectSource(props){
</ul>
}
<ul className="in_b_infos">
{ i.deptName && <li className="infos_cate">{i.deptName}</li> }
{ i.projectType && <li className="infos_language">{i.projectType}</li> }
{/* { i.deptName && <li className="infos_cate">{i.deptName}</li> } */}
{ i.projectType && <li className={`infos_cate ${ i.projectProperties && i.projectProperties.language && 'show_after' }`}>{i.projectType}</li> }
{ i.projectProperties && i.projectProperties.language && <li className=" infos_language">{i.projectProperties.language}</li> }
{ i.projectProperties && i.projectProperties.timeAgo && <li><i className="iconfont icon-a-31shijian font-13 mr3"></i> 更新于{i.projectProperties.timeAgo}</li>}
</ul>
</div>
@ -157,7 +166,7 @@ function ProjectSource(props){
:""
}
{
lists && lists.length === 0 && <Nodata _html={"暂无数据"}/>
lists && lists.length === 0 && (temp === 'zone1' ? <Nodata _html="暂无数据" img={ nodata }/> : <Nodata _html="暂无数据" />)
}
</div>
</Spin>

View File

@ -2,36 +2,84 @@ import React , { useState , useEffect } from 'react';
import Crown from '../img/crown.png';
import Nodata from '../../Nodata';
import { Link } from 'react-router-dom';
import { Spin } from 'antd';
import { getVIPLists } from '../api';
import { Spin, Button, Icon } from 'antd';
import { tempConfig } from '../tempInfo'
import MemberApply from '../Component/memberApply';
import { getVIPLists, getAuditStatus, applyJoin } from '../api';
import nodata from '../img/nodata.png';
import '../indexZone1.scss';
const memberStatusEnum = {
applying: '0',
isMember: '1',
notMember: '2'
}
function ZoneVIP(props){
const { deptId } = props.match.params;
const [ vipLists , setVIPLists ] = useState(undefined);
const [ isSpin , setIsSpin ] = useState(true);
const { id } = props;
const [ applyVisible , setApplyVisible ] = useState(false);
const [ memberStatus , setMemberStatus] = useState(memberStatusEnum.notMember);
const { id, showNotification, checkIfLogin, showLoginDialog } = props;
const temp = props.pathName
useEffect(()=>{
if(id){
setIsSpin(true);
getLists();
getMemberStatus();
}
},[id])
function getLists(){
getVIPLists(id).then(response=>{
if(response){
setVIPLists(response.data.rows);
setVIPLists(response.rows);
setIsSpin(false);
}
}).catch(error=>{setIsSpin(false);})
}
function getMemberStatus() {
getAuditStatus(id).then(res => {
if (res && res.code === 200) {
setMemberStatus(res.data)
} else {
setMemberStatus(memberStatusEnum.notMember)
}
}).catch(() => { setMemberStatus(memberStatusEnum.notMember) })
}
function onOk(e) {
applyJoin(id, e).then(res => {
if (res) {
showNotification(res.msg)
setApplyVisible(!applyVisible)
if (res.code === 200) {
setMemberStatus(memberStatusEnum.applying)
}
}
})
}
function apply() {
if(checkIfLogin()===false){
showLoginDialog()
return false;
}
setApplyVisible(!applyVisible)
}
return(
<div className="boxmain zone_VIP_box">
<p className="in_title">专区会员</p>
<p className="vip_sub_title">社区根据您的贡献与扮演角色将用户划分成为不同的人员团队并构建会员成长体系您有兴趣成为会员尽情发挥创意与智慧与专区共同成长吗</p>
<div className={`boxmain ${temp}_VIP_box`}>
<p className="in_title">{ tempConfig[temp].member }</p>
<p className="vip_sub_title">{ tempConfig[temp].vipDesc }</p>
{ memberStatus === memberStatusEnum.notMember && <Button className="apply_button" onClick={ apply }>申请加入</Button> }
{ memberStatus === memberStatusEnum.applying && <div className="mt20 tips" ><Icon type="check-circle" theme="filled" />您的申请已提交请耐心等待管理员审核!</div> }
<MemberApply visible={applyVisible} onOk={ onOk } onCancel={() => setApplyVisible(!applyVisible)} current_user={props.current_user}/>
<Spin spinning={isSpin}>
<div style={{minHeight:400}}>
{
@ -43,7 +91,12 @@ function ZoneVIP(props){
<div className="vip_list_card">
<div className="card_title">
<img src={Crown} alt="" width="37px" style={{marginBottom:5,marginRight:5}}/>
<span>{i.typeName}</span>
<div>
<div>
{i.typeName}
</div>
{ temp === 'zone1' && <div className="linear_gradient">{i.typeName}</div> }
</div>
</div>
<p className="card_desc">{i.typeIntroduction}</p>
{
@ -52,19 +105,24 @@ function ZoneVIP(props){
{
i.zoneMemberList.map((j,key)=>{
return(
<li className="card_u_li">
<div className="card_u_wrap">
<Link to={`/${j.login}`} ><img src={j.imageUrl} alt="" /></Link>
<div className="card_u_info">
<div className="card_u_up"><span className="card_name task-hide">{j.name}</span>{j.memberLevel && <span className="card_tag">{j.memberLevel}</span> }</div>
<p className="card_u_down task-hide-2">{j.introduction}</p>
</div>
</div>
</li>
)
})
}
</ul>
:
<Nodata _html="暂无数据"/>
(
temp === 'zone1' ? <Nodata _html="暂无数据" img={ nodata }/> : <Nodata _html="暂无数据" />
)
}
</div>
)

View File

@ -2,10 +2,11 @@
import fetch from './fetch';
/**入口页接口***/
export function getMainInfos(deptId) {
export function getMainInfos(deptId, params) {
return fetch({
url: `/zone/open/zoneName/${deptId}`,
url: `/zone/open/zoneKey/${deptId}`,
method: 'get',
params
});
}
@ -81,3 +82,20 @@ export function getVIPLists(id){
method: 'get',
})
}
/**会员申请状态 */
export function getAuditStatus(id){
return fetch({
url:`/zone/member/zone/${id}/auditStatus`,
method: 'get',
})
}
/**会员申请状态 */
export function applyJoin(id,data) {
return fetch({
url: `/zone/member/applyToJoin/zone/${id}`,
method: 'post',
data: data
});
}

View File

@ -1,44 +1,10 @@
import axios from 'axios';
import { message , notification } from 'antd';
import javaFetch from '../javaFetch';
function beforeFetch(actionUrl){
if (window.location.href.indexOf('localhost') < 0) {
axios.defaults.withCredentials = true;
}
const service = axios.create({
baseURL: actionUrl,
timeout: 1800000, // 请求超时时间
});
service.interceptors.response.use(
response => {
const res = response||{};
if(res && res.data && res.data.code === 404){
message.error("错误链接!");
window.location.href = '/nopage';
return Promise.reject('error');
}else if(res && res.data && res.data.code === 500){
message.error(res.data.msg);
return Promise.reject('error');
}else{
return response;
}
},
error => {
console.log(error);
// notification.open({
// message: "提示",
// description: error.message,
// });
// return Promise.reject(error);
}
)
return service;
}
let settings = localStorage.chromesetting&&JSON.parse(localStorage.chromesetting);
let actionUrl = settings && settings.common.zone +'/api';
let actionUrl = settings && settings.common.zone +"/api";
const service = beforeFetch(actionUrl);
const service = javaFetch(actionUrl);
export const httpUrl = actionUrl;
// export const main_site_url = settings && settings.common.main_site_url
export default service;

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -2,14 +2,17 @@ import React ,{ useEffect , useState } from "react";
import { Route, Switch } from "react-router-dom";
import { withRouter } from "react-router";
import { SnackbarHOC } from "educoder";
import { CNotificationHOC } from "../../modules/courses/common/CNotificationHOC";
import { TPMIndexHOC } from "../../modules/tpm/TPMIndexHOC";
import Loadable from "react-loadable";
import Loading from "../../Loading";
import PublicBanner from "./Component/publicBanner";
import { getMainInfos , getCheckZoneRole } from './api';
import PublicBanner from "./Component/publicBanner";
import './index.scss';
import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css";
const VIP = Loadable({
loader: () => import("./Pages/zoneVIP"),
@ -19,6 +22,12 @@ const HeaderPage = Loadable({
loader: () => import("./Pages/headerPage"),
loading: Loading,
});
const HeaderPageZone1 = Loadable({
loader: () => import("./Pages/headerPageZone1"),
loading: Loading,
});
const ProjectSource = Loadable({
loader: () => import("./Pages/projectSource"),
loading: Loading,
@ -27,15 +36,22 @@ const NewsDetail = Loadable({
loader: () => import("./Pages/newsDetail"),
loading: Loading,
});
const NewsList = Loadable({
loader: () => import("./Pages/newsList"),
loading: Loading,
});
const Main = Loadable({
loader: () => import("./Pages/main"),
loading: Loading,
});
function Index(props){
const [ data , setData ] = useState(undefined);
const [ adminUrl , setAdminUrl ] = useState(undefined);
const { deptId } = props.match.params;
const [ id , setId ] = useState(undefined);
const temp = props.pathName
useEffect(()=>{
if(deptId){
@ -43,10 +59,19 @@ function Index(props){
}
},[deptId])
function setTheme() {
document.getElementsByTagName("html")[0].dataset.theme = temp;
}
setTheme()
function getDetail(){
getMainInfos(deptId).then(result=>{
getMainInfos(deptId, { template: temp }).then(result=>{
if(result){
let data = result.data.data;
if (result.code === 404) {
props.history.push('/nopage');
return
}
let data = result.data;
setData(data);
document.title= data&& data.name;
setId(data.id);
@ -59,8 +84,8 @@ function Index(props){
function getAdminUrl(id){
getCheckZoneRole(id).then(response=>{
if(response && response.data && response.data.data){
setAdminUrl(response.data.data);
if(response){
setAdminUrl(response.data);
}else{
setAdminUrl(undefined);
}
@ -71,39 +96,39 @@ function Index(props){
<PublicBanner {...props} data={data} adminUrl={adminUrl}/>
<Switch>
<Route
path="/zone/:deptId/news/:cateId"
path="/:temp/:deptId/news/:cateId"
render={(p) => (
<Main {...props} {...p} id={id}/>
)}
></Route>
<Route
path="/zone/:deptId/newdetail/:id"
path="/:temp/:deptId/newdetail/:id"
render={(p) => (
<NewsDetail {...props} {...p} id={id}/>
)}
></Route>
<Route
path="/zone/:deptId/VIP"
path="/:temp/:deptId/VIP"
render={(p) => (
<VIP {...props} {...p} id={id}/>
)}
></Route>
<Route
path="/zone/:deptId/projects"
path="/:temp/:deptId/projects"
render={(p) => (
<ProjectSource {...props} {...p} id={id}/>
)}
></Route>
<Route
path="/zone/:deptId/news"
path="/:temp/:deptId/news"
render={(p) => (
<Main {...props} {...p} id={id}/>
)}
></Route>
<Route
path="/zone/:deptId"
path="/:temp/:deptId"
render={(p) => (
<HeaderPage {...props} {...p} data={data} id={id}/>
temp === 'zone' ? <HeaderPage {...props} {...p} data={data} id={id}/> : <HeaderPageZone1 {...props} {...p} data={data} id={id}/>
)}
></Route>
</Switch>

View File

@ -1,3 +1,5 @@
@import './theme.scss';
.information_main{
background-color:#f3f5f8;
min-height: 100vh;
@ -5,7 +7,7 @@
font-size: 15px;
margin-bottom: 20px;
.ant-breadcrumb-link{
color: #466aff;
color: var(--primary-color);
}
& > span:last-child .ant-breadcrumb-link{
color: rgba(76, 88, 118, 1);
@ -79,7 +81,7 @@
left: 0px;
height: 4px;
bottom: 1px;
background-color: #466aff;
background-color: var(--primary-color);
}
&.ant-menu-item-active::after{
background-color:rgba(255, 255, 255, 0.36);
@ -147,7 +149,7 @@
text-overflow: ellipsis;
}
&:hover{
color: #466aff;
color: var(--primary-color);
}
span{
display: block;
@ -156,7 +158,7 @@
color: #fff;
height:22px;
line-height:22px;
background-color:#466aff;
background-color: var(--primary-color);
opacity: 0.3;
border-radius:2px;
margin-right: 7px;
@ -354,11 +356,63 @@
.boxmain{
width: 1200px;
margin:0px auto;
.main_tag {
margin: auto;
height: 50px;
width: fit-content;
border-radius: 4px;
display: flex;
justify-content: center;
margin-top: 42px;
margin-bottom: 48px;
box-shadow:0px 0px 15px rgba(30, 47, 162, 0.09);
overflow: hidden;
.main_tag_item {
background-color: #f6f7fa;
text-align: center;
line-height: 50px;
border-top: solid white 2px;
border-bottom: solid white 2px;
width: 164px;
position: relative;
padding: 0 5px;
cursor: pointer;
a {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.main_tag_item:last-child {
border-right: solid white 2px;
}
.main_tag_item:first-child {
border-left: solid white 2px;
}
.main_tag_item:not(:last-child)::after {
content: "";
height: 100%;
width: 1px;
background-color: #8d95ac;
opacity: 0.17;
position: absolute;
right: 0;
}
.main_tag_selected {
background-color: #089f7f;
color: white;
border: none !important;
}
}
}
.flexCenter{
display: flex;
align-items: center;
}
.flexCenterJustify{
display: flex;
justify-content: center;
}
.detail_news_all{
.detail_banners{
background-image: url(./img/subbanner.png);
@ -411,6 +465,13 @@
}
.in_pro{
padding-bottom: 80px;
.project_sub_title {
margin-top: 15px;
color: #1f2329;
font-size: 17px;
line-height: 27px;
text-align: center;
}
.in_list{
padding:30px 30px 30px 35px;
background-color: #fff;
@ -420,6 +481,14 @@
align-items: center;
justify-content: space-between;
margin-bottom: 5px;
.ant-btn-primary{
color: #fff;
background-color: var(--primary-color);
border:none;
&:hover{
background-color: var(--light-color);
}
}
}
.in_list_box{
min-height: 40vh;
@ -481,10 +550,10 @@
li{
height:24px;
line-height:24px;
background-color:rgba(70, 106, 255, 0.12);
background-color:var(--tag-back);
border-radius:2px;
margin-right: 12px;
color:#466aff;
color: var(--primary-color);
font-size:13px;
padding:0px 7px;
}
@ -506,9 +575,11 @@
content: "";
width:6px;
height:6px;
background-color:#466aff;
background-color:var(--primary-color);
border-radius: 50%;
}
}
.show_after {
&::after{
content: "";
right: 0px;
@ -551,8 +622,8 @@
align-items: center;
}
&.active{
color:#466aff;
background-image:linear-gradient(89.9deg,rgba(70, 106, 255, 0) 0%,rgba(70, 106, 255, 0.09) 100%);
color: var(--primary-color);
background-image: var(--linear-back-color);
}
&.active::after{
position: absolute;
@ -560,7 +631,7 @@
height: 100%;
content: "";
width: 3px;
background-color: #466aff;
background-color: var(--primary-color);;
}
}
}
@ -577,6 +648,7 @@
padding:27px 24px;
&>img{
border-radius: 4px;
object-fit: cover;
}
.zone_infos_desc{
padding:0px 34px 0px 10px;
@ -702,15 +774,15 @@
margin-right: 0px!important;
}
.imgBox{
// background-color: #E3E7F3;
border-radius: 50%;
background-color: #E3E7F3;
border-radius: 8px;
width: 75px;
height: 75px;
margin-right: 14px;
img{
width: 75px;
height: 75px;
border-radius: 50%;
border-radius: 8px;
}
}
.infosBox{
@ -829,6 +901,9 @@
}
.zone_VIP_box{
padding:50px 0px;
display: flex;
flex-direction: column;
align-items: center;
.vip_sub_title{
color:#1f2329;
font-size:15px;
@ -839,7 +914,7 @@
margin:16px auto 0px;
}
.vip_list{
width: 1200px;
.vip_list_card{
background-color:#fefefe;
border-radius:4px;
@ -882,14 +957,15 @@
margin-top: 15px;
padding-bottom: 10px;
.card_u_li{
&:last-child .card_u_wrap{
border-bottom: none;
}
.card_u_wrap {
display: flex;
padding:25px 0px;
border-bottom: 1px dashed rgba(141, 149, 172,0.27);
align-items: center;
object-fit: cover;
&:last-child{
border-bottom: none;
}
& > a >img{
width: 100px;
height: 100px;
@ -935,9 +1011,90 @@
}
}
}
.informations_detail.markdown-body{
&>p{
line-height: 32px;
margin-bottom: 8px!important;
}
.zone_VIP_box, .zone1_VIP_box {
.apply_button {
flex-grow: 0;
margin-top: 20px;
width: 111px;
height: 40px;
color: var(--primary-color);
border-color: var(--primary-color);
font-size: 15px;
&:hover, &:active, &:focus {
color: var(--primary-color);
border-color: var(--primary-color);
}
}
.tips {
width: 100%;
font-size: 15px;
display: flex;
justify-content: center;
align-items: center;
background-color: var(--more-light-color);
height: 46px;
border-radius: 4px;
box-shadow: 0px 0px 12px rgba(51, 156, 103, 0.09);
border:1px solid var(--primary-color);
color:#222324;
.anticon {
font-size: 18px;
color: var(--primary-color);
margin-right: 7px;
}
}
.none_panels {
background-color: #FFFFFF;
margin: 25px 25px 25px 0;
border-radius: 12px;
}
}
.zone_parter{
background-color: #fff;
padding:70px 0px 90px;
#scrollBox1{
max-height: 332px;
overflow: hidden;
margin: 35px 0px 0px;
width: 100%;
.unitMainSlider{
width: 1200px;
margin:0px auto;
.slick-list{
height: 140px;
width: 100%;
overflow: hidden;
.slickMainline{
display: flex!important;
padding:10px 2px;
align-items: center;
justify-content: center;
a{
background: #FFFFFF;
box-shadow: 0px 1px 8px 1px rgba(0, 0, 0, 0.06);
border-radius: 4px;
border: 1px solid #FFFFFF;
margin-right: 20px;
padding:20px;
height: 120px;
width: 220px;
display: flex;
align-items: center;
justify-content: center;
&:hover{
border: 1px solid #8FCEFF;
}
img{
max-width: 100%;
max-height: 100%;
}
&:last-child{
margin-right: 0px;
}
}
}
}
}
}
}

View File

@ -0,0 +1,641 @@
@import './theme.scss';
.zone1_box{
padding-top:70px;
background-color:#f7f9fc;
.zone_infos{
display: flex;
align-items: center;
margin-top: 54px;
padding:27px 24px;
&>img{
border-radius: 4px;
object-fit: cover;
}
.zone_infos_desc{
padding:0px 34px 0px 10px;
flex: 1;
.z_name{
color:#1f2329;
font-size:26px;
height: 28px;
line-height: 28px;
margin-bottom: 28px!important;
}
.z_desc{
color:#3d485d;
font-size:14px;
line-height:32px;
word-break: break-all;
-webkit-line-clamp: 4;
}
}
}
.zone_vision {
background-color: #ffffff;
.boxmain {
display: flex;
justify-content: space-between;
}
.vision_item {
width: 244px;
display: flex;
align-items: center;
flex-direction: column;
.vision_icon {
height: 162px;
width: 162px;
background-image: url(./img/visionBack.png);
background-size: 100% 100%;
position: relative;
img {
width: 30%;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
}
.vision_icon:hover {
background-image: url(./img/visionBackActive.png);
}
.vision_title {
font-weight:700;
color:#1f2329;
font-size:17px;
line-height:27px;
text-align:center;
margin-top: 39px;
}
.vision_content {
margin-top: 21px;
color:#4c5876;
font-size:14px;
line-height:27px;
text-align:center;
}
}
}
.zone_news{
height: 29vw;
min-height: 475px;
background-color: #273144;
background-image: url(./img/newsBg.png);
background-repeat: no-repeat;
background-size: contain;
.boxmain {
width: 1200px;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-evenly;
}
.news_title {
height: 44px;
font-weight: 500;
color: #ffffff;
font-size: 32px;
transform: translate(40%, 0);
}
.new_first_title {
height: 25px;
color: #ffffff;
font-size: 18px;
}
.new_first_desc {
opacity: 0.8;
height: 20px;
color: #ffffff;
font-size: 14px;
line-height: 27px;
}
.zone_n_title{
color:#1f2329;
font-size:17px;
height: 24px;
line-height: 24px;
}
.zone_n_desc{
color:#4c5876;
font-size:14px;
line-height:27px;
word-break: break-all;
}
.zone_n_value{
display: flex;
align-items: center;
justify-content: space-between;
height: 20px;
line-height: 13px;
}
.zone_btn{
padding-right: 20px;
position: relative;
height: 20px;
line-height: 20px;
color: #07a583;
transition: 0.1s;
img{
position: absolute;
left: 62px;
top:5px;
transition: 0.1s;
}
}
.item_index {
display: inline-block;
width:26px;
height:26px;
margin-right: 12px;
border:1px solid;
border-color:#07a583;
border-radius:3px;
text-align: center;
line-height: 26px;
color: #07a583;
font-size: 14px;
}
.zone_new_first{
margin-left: 40%;
border-radius: 4px;
width: 682px;
padding-right: 30px;
.item_index {
font-weight:700;
color:#ffffff;
background-color:#07a583;
}
}
.zone_new_three{
width: 1200px;
display: flex;
justify-content: space-between;
margin: 0 auto;
li{
background-color: #fff;
width: 354px;
height: 196px;
padding:28px 22px;
border-radius: 4px;
display: flex;
flex-direction: column;
justify-content: space-between;
transition: 0.1s;
}
.new_item {
cursor: pointer;
}
.new_item:hover {
transform: translate(0, -10px);
img{
left: 73px;
}
.zone_btn {
transform: translate(-5px, 0);
}
.zone_n_title {
color: #07a583;
}
}
}
}
.zone_projects{
background-image:linear-gradient(180deg,#f1f4fa 0%,#ffffff 100%);
.right_arraw {
width: 48px;
height: 48px;
right: 0;
}
.left_arraw {
width: 48px;
height: 48px;
left: 0;
z-index: 100;
}
.slick-track {
display: flex;
align-items: center;
height: 435px;
.slick-slide {
height: auto;
}
}
.less_three_project {
display: flex;
justify-content: center;
.container {
.zone_p_item {
background: #fefefe;
}
margin: 10px;
}
}
.not_three_project {
.slick-track {
.slick-slide[aria-hidden="true"] {
opacity: 0;
}
}
}
.slick-current {
z-index: 100;
}
.slick-current .zone_p_item {
width:364px;
height:395px;
background:#fefefe;
}
.zone_p_item {
width: 364px;
height: 320px;
border-radius:16px;
padding: 42px 42px 35px 42px;
box-shadow:0px 0px 20px rgba(35, 54, 185, 0.06);
background: url(./img/projectBg.png) no-repeat;
background-size: 100% 100%;
border-color:#ffffff;
transition: 0.3s;
display: flex;
flex-direction: column;
align-items: center;
.info_img {
width:74px;
height: 74px;
border-radius: 50%;
}
.z_p_title {
font-weight: 700;
color: #1f2329;
font-size: 16px;
text-align: center;
margin-top: 20px;
cursor: pointer;
}
.z_p_desc{
margin-top: 18px;
color:#4c5876;
font-size:14px;
line-height:22px;
word-break: break-all;
-webkit-line-clamp: 5
}
}
.zone_p_item:hover {
.z_p_title {
color: #07a583;
}
}
}
.zone_contributor{
min-height: 466px;
background-color: #F7F9FC;
padding:44px 0px 30px;
.container {
height: 220px;
}
.zone_c_lists{
.slick-track {
display: flex;
}
.c_item {
margin-top: 40px;
margin-left: 10px;
width: 380px;
height: 165px;
background-image: url(./img/cbg.png);
background-size: 100% 100%;
position: relative;
background-color:#f6f7fa;
border:2px solid;
border-color:#ffffff;
border-radius:4px;
box-shadow:0px 0px 10px rgba(7, 70, 165, 0.11);
padding: 30px 35px;
img {
position: absolute;
width:80px;
height:80px;
border-radius: 50%;
border: solid 2px #ffffff;
right: 27px;
top: -40px;
object-fit: cover;
}
.c_name {
color: #000000;
font-size: 16px;
text-align: center;
max-width: 240px;
}
.c_desc {
color: #4c5876;
font-size: 15px;
line-height: 26px;
}
}
.c_item:hover {
box-shadow:0px 0px 35px rgba(7, 70, 165, 0.11);
}
}
}
.zone_community {
background-color:#ebeff5;
display: flex;
flex-direction: column;
align-items: center;
.sub_title {
font-size: 17px;
line-height: 27px;
img {
width:32.93px;
height:9.15px;
}
}
.c_role {
display: flex;
justify-content: space-between;
z-index: 10;
.c_role_item {
width: 260px;
height: 213px;
background-image: url(./img/cbg2.png);
background-size: 100% 100%;
position: relative;
padding: 30px 23px;
.role_level {
font-weight: 700;
font-size: 18px;
line-height: 27px;
}
.role_todo {
color: #3d485d;
font-size: 15px;
line-height: 27px;
margin-top: 10px;
}
.dot {
width:14px;
height:14px;
border-radius: 50%;
background-color:#07a583;
position: absolute;
left: 6px;
bottom: 7px;
}
}
}
.dot_line {
height: 0px;
width: 1200px;
border-bottom: dashed 1px #8d95ac;
transform: translate(0, -14px);
}
}
.zone_grow {
display: flex;
flex-direction: column;
align-items: center;
background: url('./img/growBg.png') no-repeat;
background-size: 100% 100%;
.in_title {
img {
width: 378px;
}
}
.grow_path {
height: 158px;
display: flex;
justify-content: space-around;
align-items: center;
.grow_path_item {
z-index: 10;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.grow_path_type {
width: 82px;
height: 28px;
border: 1px solid;
border-color: #07a583;
border-radius: 2px;
color: #07a583;
font-size: 15px;
display: flex;
align-items: center;
justify-content: center;
margin-top: 10px;
div {
width: 3px;
height: 13px;
background-color: #07a583;
margin-right: 3px;
}
}
.grow_path_plan {
color: #4c5876;
font-size: 15px;
text-align: center;
margin: 5px 0;
}
}
.grow_path_item:nth-child(even) {
align-self: self-end;
}
.grow_path_item:nth-child(odd) {
align-self: self-start;
}
.dot {
width:12px;
height:12px;
background-color:#ffffff;
border:1px solid;
border-color:#07a583;
border-radius: 50%;
}
}
.line {
height: 0px;
width: 1200px;
border-bottom: solid 1px #07a583;
transform: translate(0, -80px);
}
.grow_introduction {
display: flex;
justify-content: space-between;
.intro_item {
width: 275px;
height: 250px;
background-color: #ffffff;
border-radius: 6px;
box-shadow: 0px 0px 12px rgba(29, 72, 129, 0.08);
padding: 22px 17px;
transition: 0.1s;
.intro_title {
font-weight: 700;
color: #3d485d;
font-size: 16px;
img {
width: 36px;
height: 36px;
margin-right: 10px;
}
}
.intro_desc {
color: #4c5876;
font-size: 15px;
margin-top: 6px;
}
}
.intro_item:hover {
transform: translate(0, -20px);
}
}
}
.zone_communicate {
height: 160px;
background: url('./img/communicateBg.png') no-repeat;
background-size: 100% 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-evenly;
p {
font-weight: 500;
font-size: 22px;
color: #ffffff;
}
button {
width: 140px;
height: 40px;
color: #ffffff;
background-color: #07a583;
border-radius: 2px;
font-size: 16px;
cursor: pointer;
border: none;
}
}
}
.zone1_VIP_box{
padding:50px 0px;
display: flex;
flex-direction: column;
align-items: center;
.in_title{
font-size: 38px;
}
.vip_sub_title{
margin-top: 25px;
color: #1f2329;
font-size: 17px;
line-height: 27px;
text-align: center;
}
.vip_list{
margin-top: 50px;
padding-top: 1px;
padding-bottom: 35px;
width: 1200px;
background-image: url('./img/vipListBg.png'), linear-gradient(180deg,#009f7d 0%,#0f6754 100%);
background-repeat: no-repeat;
background-size: contain;
border-radius: 10px;
.vip_list_card{
padding:0px 40px 10px;
.card_title{
width: 443px;
height: 49px;
background: url('./img/vipTitleBg.png') no-repeat;
background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto;
margin-top: 38px;
font-size: 20px;
font-weight: 500;
div {
div:nth-child(1) {
position: absolute;
z-index: 10;
background-image: -webkit-linear-gradient(0deg,#fffcf9 0%,#ffffff 51.47%,#fed5a6 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: none;
}
div:not(:nth-child(1)) {
text-shadow: 0 1px 0 #fed5a6;
color: #ffffff;
}
}
}
.card_desc{
color:#ffffff;
font-size:15px;
line-height:32px;
word-break: break-all;
margin-top: 32px;
}
.card_ul{
margin: 25px 25px 25px 0;
padding-bottom: 10px;
background-image: linear-gradient(180deg,#f7f9fc 0%,#ffffff 100%);
border-radius: 12px;
.card_u_li{
&:last-child .card_u_wrap{
border-bottom: none;
}
.card_u_wrap {
display: flex;
padding:30px 40px;
border-bottom: 1px dashed rgba(141, 149, 172,0.27);
align-items: center;
object-fit: cover;
& > a >img{
width: 80px;
height: 80px;
border-radius: 50%;
margin-right: 24px;
}
.card_u_info{
.card_u_down{
color:#4c5876;
font-size:15px;
line-height:26px;
word-break: break-all;
margin-top: 15px;
}
.card_u_up{
display: flex;
align-items: center;
.card_name{
font-weight:700;
color:#1f2329;
font-size:16px;
display: block;
max-width: 700px;
height:26px;
line-height: 26px;
}
.card_tag{
color: #07a583;
border: 1px solid;
border-color: #07a583;
border-radius: 2px;
display: inline-block;
min-width: 76px;
text-align: center;
line-height: 26px;
font-size:15px;
margin-left: 15px;
}
}
}
}
}
}
}
}
}

View File

@ -0,0 +1,15 @@
export const tempConfig = {
zone: {
mainTitle: '领域资讯',
hotTitle: '热门资讯',
member: '专区会员',
vipDesc: '社区根据您的贡献与扮演角色将用户划分成为不同的人员团队,并构建会员成长体系。您有兴趣成为会员,尽情发挥创意与智慧,与专区共同成长吗?',
},
zone1: {
mainTitle: '新闻资讯',
hotTitle: '热门新闻资讯',
member: '荣誉榜单',
vipDesc: '荣誉榜单记录用户在开源芯片社区的社区角与成长进度,欢迎广大用户参与到开源芯片项目,与社区共同成长!',
}
}

View File

@ -0,0 +1,14 @@
html[data-theme="zone"] {
--primary-color: #466aff;
--light-color: rgba(70,106,255,0.85);
--more-light-color: rgba(70, 106, 255, 0.05);
--linear-back-color: linear-gradient(89.9deg,rgba(70, 106, 255, 0) 0%,rgba(70, 106, 255, 0.09) 100%);
--tag-back: rgba(70, 106, 255, 0.12);
}
html[data-theme="zone1"] {
--primary-color: #089f7f;
--more-light-color: rgba(7, 165, 131, 0.05);
--light-color: rgba(7, 165, 131, 0.85);
--linear-back-color: linear-gradient(89.9deg,rgba(7, 165, 131, 0) 0%,rgba(7, 165, 131, 0.09) 100%);
--tag-back: rgba(142, 147, 161, 0.1);
}

View File

@ -106,6 +106,7 @@
}
.commentContentBox{
display: flex;
align-items: flex-start;
}
.commentContentRight{
flex: 1;

View File

@ -4,11 +4,11 @@ import nodata from './Images/nodata.png';
import './css/index.scss';
class Nodata extends Component{
render(){
const { _html , small } = this.props;
const { _html , small, img } = this.props;
return(
<div className={small ? "none_panels small":"none_panels"}>
<div>
<img src={nodata} alt="" />
<img src={img ? img : nodata} alt="" />
<div className="none_p_title">{_html}</div>
</div>
</div>

View File

@ -25,7 +25,10 @@ const NoticeManager = Loadable({
loader: () => import("./notice/manager/Index"),
loading: Loading,
});
const CLAList = Loadable({
loader: () => import("./cla/Index"),
loading: Loading,
});
const SSHNew = Loadable({
loader: () => import("./sub/New"),
loading: Loading,
@ -116,6 +119,7 @@ function Index(props){
<ul className="securityUl ul-border-buttom">
<li>安全设置</li>
<li className={pathname.indexOf("/settings/SSH")>-1 ?"active":""}><Link to={`/settings/SSH`}><i className="iconfont icon-xuanzhongssh_icon mr5 font-14"></i><span className="text-shodow-bold">SSH密钥</span></Link></li>
<li className={pathname.indexOf("/settings/CLA")>-1 ?"active":""}><Link to={`/settings/CLA`}><i className="iconfont icon-a-zu2044 mr5 font-13"></i><span className="text-shodow-bold">我的CLA</span></Link></li>
</ul>
<ul className="securityUl">
<li>Bot开发</li>
@ -138,6 +142,12 @@ function Index(props){
<PrivateLetter{...props} {...p}/>
)}
></Route>
<Route
path="/settings/CLA"
render={(p) => (
<CLAList {...props} {...p}/>
)}
></Route>
<Route
path="/settings/notice"
render={(p) => (

View File

@ -0,0 +1,27 @@
import React , { useState , useEffect } from 'react';
import { AlignCenter } from '../../Component/layout';
import Modals from '../../Component/PublicModal/Index';
import { Button } from 'antd';
function DeleteBox({visible , onCancel,onSuccess}){
return(
<Modals
visible={visible}
onCancel={onCancel}
title={"解除协议"}
btn={
<div>
<Button size={'large'} onClick={onCancel}>取消</Button>
<Button type={"danger"} size={"large"} onClick={onSuccess}>确认删除</Button>
</div>
}
>
<div className="desc">
<AlignCenter className="descMain">
<i className="iconfont icon-jinggao1 mr10 font-20 red"></i>确定解除协议吗</AlignCenter>
<p>您解除协议后后续提交的合并请求对项目成员将不再可见已存在的不会受影响</p>
</div>
</Modals>
)
}
export default DeleteBox;

View File

@ -0,0 +1,83 @@
import React,{useEffect,useState} from 'react';
import './index.scss';
import logo from '../img/cla-logo.png';
import { Link } from 'react-router-dom';
import { Button , Spin } from 'antd';
import Nodata from '../../Nodata';
import DeleteBox from './DeleteBox';
import axios from 'axios';
function Index(props){
const { current_user } = props;
const[ lists, setLists] = useState(undefined);
const[ isSpin, setIsSpin] = useState(false);
const [ visible , setVisible ] = useState(false);
const [ cancelKey , setCancelKey ] = useState(undefined);
useEffect(()=>{
if(current_user && current_user.user_id){
setIsSpin(true);
getClaLists();
}
},[current_user])
function getClaLists(){
const url = `/users/${current_user.user_id}/clas.json`;
axios.get(url).then(response=>{
if(response && response.data){
setLists(response.data.user_clas);
setIsSpin(false);
}
}).catch(error=>{})
}
function onSuccess(){
if(cancelKey && (current_user && current_user.user_id)){
const url = `/users/${current_user && current_user.user_id}/clas/${cancelKey}.json`;
axios.delete(url).then(response=>{
if(response){
setVisible(false);
props.showNotification("协议解除成功!");
getClaLists();
}
}).catch(error=>{})
}
}
return(
<div className="cla_personal">
<DeleteBox visible={visible} onCancel={()=>{setVisible(false);setCancelKey(undefined)}} onSuccess={onSuccess}/>
<div className="default_head">我签署的CLA开源贡献者协议</div>
{
lists && lists.length>0 &&
<ul className="cla_lists">
{
lists.map((i,k)=>{
return(
<li key={k}>
<img src={logo} alt="" />
<div>
<Link to={`/${i.organization && i.organization.name}/cla/${i.cla && i.cla.key}`} className="agree_name task-hide">{i.cla && i.cla.name}</Link>
{i.state && <span className="agree_status">签署状态<span className={i.state === "signed" ? "green_tip" :"grey_tip"}>{i.state === "signed" ? "生效中" : "已解除"}</span></span> }
<span>签署邮箱<span className="ml10">{i.email}</span></span>
<span>签署时间<span className="ml10">{i.created_at}</span></span>
<p className="mt8">
<Button onClick={()=>{props.history.push(`/${i.organization && i.organization.name}/cla/${i.cla && i.cla.key}`)}} style={{color:"#466aff",borderColor:"#466aff"}}>查看协议</Button>
{ i.state === "signed" && <Button style={{color:"#ff0c0c",borderColor:"#ff0c0c"}} className="ml20" onClick={()=>{setVisible(true);setCancelKey(i.id)}}>解除协议</Button>}
</p>
</div>
</li>
)
})
}
</ul>
}
{
lists && lists.length === 0 && <Nodata _html="暂无数据"/>
}
{
!lists && <div style={{minHeight:"300px",display:'flex',alignItems:"center",justifyContent:"center"}}><Spin spinning={isSpin}></Spin></div>
}
</div>
)
}
export default Index;

View File

@ -0,0 +1,75 @@
.default_head{
height: 65px;
line-height: 64px;
border-bottom: 1px solid rgba(224, 230, 245, 1);
color:#151d40;
font-size:17px;
padding-bottom:20px;
}
.cla_lists{
display: flex;
flex-wrap: wrap;
li{
width: 478px;
margin-right: 26px;
border:1px solid;
border-color:rgba(153, 153, 153, 0.3);
border-radius:6px;
padding:30px 26px;
box-sizing: border-box;
display: flex;
align-items: flex-start;
margin-top: 25px;
&>img{
width: 65px;
margin-right: 20px;
}
&>div{
flex:1;
width: 0;
display: flex;
flex-direction: column;
&>span{
color:rgba(76, 88, 118, 1);
height: 20px;
line-height: 20px;
margin-bottom: 10px!important;
}
.agree_status{
>span{
margin-left: 20px;
position: relative;
color:#8a94a2 ;
&::before{
position: absolute;
height: 6px;
width: 6px;
border-radius: 50%;
left: -11px;
content: "";
background-color: #8a94a2;
top:50%;
margin-top: -3px;
}
&.green_tip{
color: #009b28;
}
&.green_tip::before{
background-color: #009b28;
}
}
}
.agree_name{
color:#151d40;
font-size:16px;
margin-bottom: 10px;
display: block;
height: 22px;
line-height: 22px;
}
}
&:nth-child(2n){
margin-right: 0px;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -1,8 +1,11 @@
import React, { useEffect, useState } from 'react';
import { Upload , Icon , message } from "antd";
import { getUploadActionUrl } from 'educoder';
import cookie from 'react-cookies';
function UploadImage({ getImage , url, getImageId }){
const TokenKey = 'autologin_trustie';
function UploadImage({ getImage , url, getImageId, maxSize = 2, action = getUploadActionUrl(), getImageUrl }){
const [ imageUrl , setImageUrl ] = useState(undefined);
useEffect(()=>{
setImageUrl(url);
@ -22,9 +25,9 @@ function UploadImage({ getImage , url, getImageId }){
if (!isJpgOrPng) {
message.error('上传的图片只能是JPG或者PNG格式!');
}
const isLt2M = file.size / 1024 / 1024 < 2;
const isLt2M = file.size / 1024 / 1024 < maxSize;
if (!isLt2M) {
message.error('上传的图片不能超过2MB!');
message.error(`上传的图片不能超过${maxSize}MB!`);
}
return isJpgOrPng && isLt2M;
}
@ -32,6 +35,7 @@ function UploadImage({ getImage , url, getImageId }){
function handleChange(info){
if(info && info.file && info.file.status === "done"){
getImageId && getImageId(info.file.response.id);
getImageUrl && getImageUrl(info.file.response.url)
getBase64(info.file.originFileObj, imageUrl =>
setImageUrl(imageUrl)
);
@ -43,11 +47,12 @@ function UploadImage({ getImage , url, getImageId }){
listType="picture-card"
className="avatar-uploader"
showUploadList={false}
action={getUploadActionUrl()}
action={action}
beforeUpload={beforeUpload}
onChange={handleChange}
accept="image/*"
>
accept=".png,.jpg,.jpeg"
withCredentials={ true }
headers={{ Authorization: cookie.load(TokenKey) }}>
{
imageUrl ?
<img src={imageUrl} alt="avatar" style={{ width: '100%' }} />

View File

@ -14,6 +14,10 @@ const GroupNew = Loadable({
loader: () => import("./Group/GroupNew"),
loading: Loading,
});
const CLAinfos = Loadable({
loader: () => import("./Setting/cla/CLAinfos"),
loading: Loading,
});
const New = Loadable({
loader: () => import("./New"),
loading: Loading,
@ -40,6 +44,13 @@ export default withRouter(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(
return (
<div className="newMain">
<Switch>
{/* 协议详情+签署协议 */}
<Route
path="/:OIdentifier/cla/:claid"
render={(p) => (
<CLAinfos {...props} {...p}/>
)}
></Route>
{/* 新建组织 */}
<Route
path="/organize/new"
@ -76,7 +87,6 @@ export default withRouter(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(
}}
></Route>
{/* 组织详情(包含组织设置) */}
<Route
path="/:OIdentifier/setting"

View File

@ -122,7 +122,7 @@ export default Form.create()(
})
}
return(
<div>
<div style={{border:"1px solid #eee"}}>
<WhiteBack>
<Title>基本设置</Title>
<Modals visible={privacyVisible} okText={"确认"} cancelText={"取消"} onCancel={concelChangePrivacy} onOk={()=>setPrivacyVisible(false)}>

View File

@ -5,7 +5,7 @@ import GroupItems from '../TeamGroupItems';
const limit = 8;
function TeamSettingGroup({organizeDetail,history,current_user}){
return(
<WhiteBack>
<WhiteBack style={{border:"1px solid #eee"}}>
<Banner>组织团队管理</Banner>
<GroupItems limit={limit} organizeDetail={organizeDetail} count={4} history={history} current_user={current_user}/>
</WhiteBack>

View File

@ -42,7 +42,6 @@ export default (( props )=>{
const pathname = props.location.pathname;
const OIdentifier = props.match.params.OIdentifier;
const {organizeDetail} = props;
useEffect(()=>{
if(organizeDetail){
const {nickname} = organizeDetail;
@ -60,7 +59,7 @@ export default (( props )=>{
a = 3;
// }else if(pathname === `/${OIdentifier}/setting/hooks`){
// a = 4;
}else if(pathname.indexOf(`/${OIdentifier}/setting/cla`)>-1){
}else if(pathname.indexOf(`/${OIdentifier}/setting/agreement`)>-1){
a = 4;
}
return a;
@ -72,7 +71,7 @@ export default (( props )=>{
{name:'组织成员管理',icon:"icon-zuzhichengyuan",href:`/${OIdentifier}/setting/member`},
{name:'组织团队管理',icon:"icon-zuzhixiangmu",href:`/${OIdentifier}/setting/group`},
// {name:'web',icon:"icon-zhongqingdianxinicon10",href:`/${OIdentifier}/setting/hooks`}
{name:'CLA管理',img:claIcon,href:`/${OIdentifier}/setting/cla`}
{name:'CLA管理',img:claIcon,href:`/${OIdentifier}/setting/agreement`}
],
active
}
@ -83,18 +82,24 @@ export default (( props )=>{
</Short>
<Long>
<Gap >
<div style={{border:"1px solid #eee"}}>
<div>
<Switch>
<Route
path="/:OIdentifier/setting/cla/new"
render={() => (
<CLANew {...props} />
path="/:OIdentifier/setting/agreement/new"
render={(p) => (
<CLANew {...props} {...p}/>
)}
></Route>
<Route
path="/:OIdentifier/setting/cla"
render={() => (
<CLA {...props} />
path="/:OIdentifier/setting/agreement/:claid"
render={(p) => (
<CLANew {...props} {...p}/>
)}
></Route>
<Route
path="/:OIdentifier/setting/agreement"
render={(p) => (
<CLA {...props} {...p}/>
)}
></Route>
<Route

View File

@ -111,7 +111,7 @@ export default (({organizeDetail,history,match})=>{
}).catch(error=>{})
}
return(
<WhiteBack>
<WhiteBack style={{border:"1px solid #eee"}}>
<Title>
<span>组织成员管理</span>
{/* <AlignCenter>

View File

@ -51,7 +51,7 @@ export default Form.create()(forwardRef((props)=>{
})
}
return(
<div>
<div style={{border:"1px solid #eee"}}>
<Title>
<span>组织首页管理</span>
</Title>

View File

@ -0,0 +1,101 @@
import React,{ forwardRef, useState , useEffect } from 'react';
import '../teamSetting.scss';
import RenderHtml from '../../../../components/render-html';
import { Button , Form , Input} from 'antd';
import Cla from '../../images/cla.png';
import axios from 'axios';
function CLAinfos(props){
const { form , current_user } = props;
const { getFieldDecorator , validateFields , setFieldsValue , getFieldsValue} = form;
const OIdentifier = props.match.params.OIdentifier;
const claid = props.match.params.claid;
const [ details, setDetails ] = useState(undefined);
useEffect(()=>{
if(current_user &&!current_user.login){
props.history.push(`/login`);
}
},[current_user])
useEffect(()=>{
if(claid){
getDetails();
}
},[claid])
function getDetails(){
const url = `/organizations/${OIdentifier}/clas/${claid}.json`;
axios.get(url).then(response=>{
if(response && response.data){
setDetails(response.data);
}
}).catch(error=>{})
}
function agreeFunc(){
validateFields((error,values)=>{
if(!error){
const url = `/users/${current_user && current_user.user_id}/clas.json`;
axios.post(url,{
...values,
cla_id:details && details.id
}).then(response=>{
if(response && response.data){
props.showNotification('协议签署成功!');
getDetails();
}
}).catch(error=>{})
}
})
}
return(
details &&
<div className="cla_allinfos">
<div className="cla_infos_header">
<div>
<img src={Cla} alt="" />
<div className="cla_i">
<p className="cla_i_name">{details.name}</p>
<p className="cla_o_name">{details.organization && details.organization.nickname}</p>
{details.is_sign && details.cla_sign_email && <p className="cla_i_email">签署邮箱<span className="ml10">{details.cla_sign_email}</span></p> }
</div>
</div>
</div>
<div style={{margin:"0px auto",width:"1200px",paddingBottom:"50px"}}>
{details.is_sign && <div className="wirtes_tips"><span>您已签署协议可在个人设置 &gt; 我的 CLA中查看和管理本协议</span></div> }
<div className="cla_c">
<p className="cla_c_title">协议内容</p>
<RenderHtml className="cla_c_html imageLayerParent" value={details.content} url={props.history.location}/>
</div>
{
!details.is_sign && !details.is_member &&
<Form>
<div className="form_div">
<Form.Item label="真实姓名">
{getFieldDecorator("real_name",{
rules:[{ required: true, message: "请输入您的真实姓名" }]
})(
<Input placeholder="请输入真实姓名" maxLength={30}/>
)}
</Form.Item>
<Form.Item label="签署邮箱">
{getFieldDecorator("email",{
rules:[{ required: true, message: "请输入签署邮箱" }]
})(
<Input placeholder="请输入签署邮箱" maxLength={30}/>
)}
</Form.Item>
</div>
<Button type={"primary"} style={{marginTop:"20px"}} onClick={agreeFunc}>接受并签署协议</Button>
</Form>
}
</div>
</div>
)
}
export default Form.create()(forwardRef(CLAinfos))

View File

@ -1,18 +1,62 @@
import React from 'react';
import React,{ useState , useEffect } from 'react';
import Title from '../../../Component/Title';
import defaultimg from '../../images/cla-icon-big.png';
import { Button } from 'antd';
import Logo from '../../images/cla-logo.png';
import { Button, Spin } from 'antd';
import axios from 'axios';
function TeamSettingCLA(props){
const OIdentifier = props.match.params.OIdentifier;
const [ list , setList ] = useState(undefined);
const [ isSpin , setisSpin ] = useState(false);
useEffect(()=>{
if(OIdentifier){
setisSpin(true);
getList();
}
},[OIdentifier])
function getList(){
const url = `/organizations/${OIdentifier}/clas.json`;
axios.get(url).then(response=>{
if(response){
let l = {...response.data};
setList(l);
setisSpin(false);
}
}).catch(error=>{})
}
return(
<div>
<div style={{border:list && list.id ? "none":"1px solid #eee"}}>
<Title>CLA管理</Title>
{
(list && list.id) &&
<ul className="cla_list_box">
<li>
<img src={Logo} width="65px" className="mr20" alt="" />
<div className="cla_list_infos">
<p className="task-hide cla_name">{list.name}</p>
<span className="cla_personCount">签署人数<span>{list.count || 0}</span></span>
<div className="cla_btn">
<Button onClick={()=>{props.history.push(`/${OIdentifier}/cla/${list.key}`)}} style={{color:"#466aff",borderColor:"#466aff"}}>查看协议</Button>
<Button onClick={()=>{props.history.push(`/${OIdentifier}/setting/agreement/${list.key}`)}} style={{color:"#466aff",borderColor:"#466aff"}} className="ml22">编辑</Button>
</div>
</div>
</li>
</ul>
}
{
(list && !list.id) &&
<div className="cla_default_box">
<img src={defaultimg} alt="" width="68px"/>
<p className="cla_default_desc">CLA Contributor License Agreement指开源贡献者许可协议您可以为本组织配置CLA当非组织用户作为贡献者在组织仓库提交合并请求之前需要签署CLA后才可正常提交合并请求</p>
<Button type={'primary'} onClick={()=>{props.history.push(`/${OIdentifier}/setting/cla/new`)}}>添加协议</Button>
<Button type={'primary'} onClick={()=>{props.history.push(`/${OIdentifier}/setting/agreement/new`)}}>添加协议</Button>
</div>
}
{ list === undefined && <div style={{minHeight:"280px",display:"flex",alignItems:'center',justifyContent:"center"}}><Spin spinning={isSpin}/></div>}
</div>
)
}

View File

@ -2,33 +2,92 @@ import React ,{ forwardRef , useState , useEffect } from 'react';
import Title from '../../../Component/Title';
import MdEditor from "../../../../modules/tpm/challengesnew/tpm-md-editor";
import { Button, Form , Input , Switch } from 'antd';
import { turnbar , returnbar } from 'educoder';
import { Link } from 'react-router-dom';
import axios from 'axios';
export default Form.create()(
forwardRef(({ form , match , organizeDetail })=>{
forwardRef((props)=>{
const { form , match , showNotification , history , location } = props;
const { getFieldDecorator , validateFields , setFieldsValue , getFieldsValue} = form;
const [ switchBtn , setSwitchBtn ] = useState(false);
const [ details , setDetails] = useState(undefined);
const OIdentifier = match.params.OIdentifier;
const claid = match.params.claid;
const keyBefore = window.location.origin+`/${OIdentifier}/cla/`;
useEffect(()=>{
if(claid){
getDetails();
}
},[claid])
function getDetails(){
const url = `/organizations/${OIdentifier}/clas/${claid}.json`;
axios.get(url).then(response=>{
if(response && response.data){
setFieldsValue({
...response.data
})
setSwitchBtn(response.data.pr_need);
setDetails(response.data);
}
}).catch(error=>{})
}
//
function saveClaFunc(){
validateFields((error,values)=>{
if(!error){
const url = `/organizations/${OIdentifier}/clas`;
axios.post(url,{
const params = {
pr_need:switchBtn,
...values
...values,
key:turnbar(values.key)
}
if(claid){
const url = `/organizations/${OIdentifier}/clas/${claid}.json`;
axios.put(url,{
...params
}).then(response=>{
if(response){
if(response && response.data){
window.scrollTo(0,0);
showNotification("协议更新成功!");
history.push(`/${OIdentifier}/setting/agreement`);
}
}).catch(error=>{})
}else{
const url = `/organizations/${OIdentifier}/clas.json`;
axios.post(url,{
...params
}).then(response=>{
if(response && response.data && response.data.id){
window.scrollTo(0,0);
showNotification("协议创建成功!");
history.push(`/${OIdentifier}/setting/agreement`);
}
}).catch(error=>{})
}
}
})
}
function checkKeyReg(rule, value, callback){
let reg = /^[a-zA-Z0-9][a-zA-Z0-9_]*[a-zA-Z0-9]+$/g
if(value && !reg.test(value)){
callback("协议标识只能以数字、字母开头结尾,可包含下划线");
}
callback();
}
return(
<div>
<Title>创建CLA</Title>
<div style={{border:'1px solid #eee'}}>
{
claid ?
<Title><span><Link to={`/${OIdentifier}/setting/agreement`} className="color-blue mr3">CLA管理</Link>&gt;<span className="ml2">编辑协议</span></span></Title>
: <Title>创建CLA</Title>
}
<Form style={{padding:"20px 30px 30px 30px"}}>
<Form.Item label="协议名称">
{getFieldDecorator("name",{
@ -39,9 +98,12 @@ export default Form.create()(
</Form.Item>
<Form.Item label="协议标识">
{getFieldDecorator("key",{
rules:[{ required: true, message: "请输入协议标识" }]
rules:[
{ required: true, message: "请输入协议标识" },
{ validator: checkKeyReg }
]
})(
<Input addonBefore="Http://" placeholder="请输入协议标识" maxLength={30}/>
<Input addonBefore={keyBefore} autoComplete={"off"} placeholder="请输入协议标识" maxLength={30}/>
)}
</Form.Item>
<Form.Item label="协议内容">
@ -52,7 +114,9 @@ export default Form.create()(
height={280}
mdID={"cla_md"}
noStorage={true}
placeholder="请输入协议内容"/>
placeholder="请输入协议内容"
initValue={details && details.content}
/>
)}
</Form.Item>
<p className="mb10">合并请求准入设置:</p>
@ -61,6 +125,7 @@ export default Form.create()(
<span className={`ml10`} style={{color:switchBtn ? "#466aff" :"#4c5b76"}}>要求 Pull Request 中所有提交者必须签署 CLA 方可合并</span>
</span>
<Button onClick={saveClaFunc} className="mt30" type={"primary"}>确认</Button>
{ claid && <Button style={{color:"#ff0c0c",borderColor:"#ff0c0c"}} className="ml20">解除协议</Button>}
</Form>
</div>
)

View File

@ -13,3 +13,120 @@
margin:20px 0px!important;
}
}
.cla_list_box{
display: flex;
flex-wrap: wrap;
padding-top: 25px;
li{
margin-right: 24px;
border:1px solid;
border-color:rgba(153, 153, 153, 0.3);
border-radius:6px;
width: 446px;
display: flex;
padding:30px 26px;
box-sizing: border-box;
justify-content: flex-start;
align-items: flex-start;
margin-bottom: 25px;
&:nth-child(2n){
margin-right: 0px;
}
.cla_list_infos{
flex:1;
width: 0;
.cla_name{
color:#151d40;
font-size:16px;
padding-bottom:20px;
height: 22px;
line-height: 22px;
word-break: break-all;
margin-bottom: 14px!important;
}
.cla_personCount{
color:#4c5876;
display: block;
margin-bottom: 15px!important;
span{
margin-left: 10px;
}
}
}
}
}
.cla_allinfos{
.cla_infos_header{
background-color:rgba(70, 106, 255, 0.05);
padding:30px 0px;
&>div{
display: flex;
align-items: center;
margin:0px auto;
width: 1200px;
&>img{
width: 116px;
margin-right: 32px;
border-radius: 4px;
}
.cla_i{
flex: 1;
width: 0;
.cla_i_name{
font-weight:700;
color:#333333;
font-size:24px;
height: 33px;
line-height: 33px;
margin-bottom: 0px!important;
}
.cla_o_name,.cla_i_email{
color:#4c5b76;
font-size:15px;
height: 20px;
line-height: 20px;
margin-top: 18px;
}
.cla_i_email{
margin-top: 12px;
}
}
}
}
.wirtes_tips{
margin:25px 0px;
span{
padding:9px 18px;
font-size:15px;
border:1px solid;
border-radius:6px;
border-color:#009b28;
color: #009b28;
}
}
.cla_c{
width: 100%;
background-color:rgba(245, 245, 245, 0.5);
border-radius: 2px;
padding:25px;
margin:16px auto;
.cla_c_title{
font-weight:700;
color:#202d40;
font-size:15px;
padding-bottom:20px;
height: 22px;
line-height: 22px;
margin-bottom: 15px!important;
}
}
.form_div{
display: flex;
&>div{
flex:1
}
&>div:first-child{
margin-right: 40px;
}
}
}

View File

@ -111,7 +111,7 @@ function Detail(props){
}
/>
}
<Switch {...props}>
<Switch>
{/* 组织团队-详情 */}
<Route

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@ -159,7 +159,7 @@ export default (props) => {
<div></div>
</div>
<div className="intro">OpenMMLab是深度学习时代最完整的计算机视觉开源算法体系自开源以来累计发布了超过20个算法库有超过300个算法2300多个预训练模型所有算法均具备风格统一模型丰富质量高易复现等特点在社区生态上OpenMMLab一直秉持开放认真持续成长的原则积极推动社区建设发展</div>
<div className="goToButBox"><button className="goToBut" onClick={()=>{window.location.href='/glcc/openmmlab'}}>查看详情</button></div>
<div className="goToButBox"><button className="goToBut" onClick={()=>{window.location.href='/glcc/openmmlab/2022'}}>查看详情</button></div>
</div>}
</div>
</div>

View File

@ -124,7 +124,8 @@ const Glcc = (propsF) => {
//
function judge(nowTime, timeRnge, type){
const timeArr = timeRnge.split(",").map(item=>{
const data = item && item.replaceAll('-', '/');
// replaceAll
const data = item && item.replace(/-/g,'/');
return new Date(data).getTime()
});
return type === "range" ? nowTime > timeArr[0] && nowTime < timeArr[1] : nowTime > timeArr[0]
@ -235,14 +236,14 @@ const Glcc = (propsF) => {
{!(round === 2 && !repoPublic) && <Route
path="/glcc/:id/subjects/detail/:taskId"
render={(props) => (
<TaskDetail {...propsF} {...props} applyTaskId={applyTaskId} applyTask={applyTask} period={period}/>
<TaskDetail {...propsF} {...props} applyTaskId={applyTaskId} applyTask={applyTask} period={period} round={round} currentRound={currentRound}/>
)}
></Route>}
{/* 项目/课题列表 */}
{!(round === 2 && !repoPublic) && <Route
path="/glcc/:id/projects"
render={(props) => (
<Project period={period} round={round} {...propsF} {...props} applyTaskId={applyTaskId} setStudentInfoReset={setStudentInfoReset} applyTask={applyTask}/>
<Project period={period} round={round} {...propsF} {...props} applyTaskId={applyTaskId} setStudentInfoReset={setStudentInfoReset} applyTask={applyTask} currentRound={currentRound}/>
)}
></Route>}
@ -250,7 +251,7 @@ const Glcc = (propsF) => {
{!(round === 2 && !repoPublic) && <Route
path="/glcc/:id/subjects"
render={(props) => (
<Project period={period} round={round} {...propsF} {...props} applyTaskId={applyTaskId} setStudentInfoReset={setStudentInfoReset} cancelCount={cancelCount} applyTask={applyTask}/>
<Project period={period} round={round} {...propsF} {...props} applyTaskId={applyTaskId} setStudentInfoReset={setStudentInfoReset} cancelCount={cancelCount} applyTask={applyTask} currentRound={currentRound}/>
)}
></Route>}
@ -258,7 +259,7 @@ const Glcc = (propsF) => {
<Route
path="/glcc/openmmlab"
render={(props) => (
<Openmmlab {...propsF} {...props} applyTaskId={applyTaskId} setStudentInfoReset={setStudentInfoReset} applyTask={applyTask}/>
<Openmmlab period={period} {...propsF} {...props} applyTaskId={applyTaskId} setStudentInfoReset={setStudentInfoReset} applyTask={applyTask}/>
)}
></Route>

View File

@ -9,6 +9,7 @@ import { projectList } from '../api';
import './index.scss';
function Openmmlab(props) {
const {location:{pathname}} = props;
const [list, setList] = useState([]);
@ -19,8 +20,9 @@ function Openmmlab(props) {
useEffect(() => {
const params = {
curPage: 1,
keyword: 'openmmlab',
pageSize: 10000
keyword: 'openmmlab-',
pageSize: 10000,
round: pathname && pathname.endsWith("/2022") ? 1 : 2
}
projectList(params).then(response => {
if (response && response.message === "success") {
@ -40,23 +42,23 @@ function Openmmlab(props) {
<div className="openmmlab_slider openmmlab_main">
<div className="slider_left">
<SliderLeft />
<SliderLeft pathname={pathname}/>
</div>
<div className="slider_right">
<SliderRight list={list} {...props}/>
<SliderRight list={list} {...props} year={pathname.endsWith("/2022") ? "2022" : "2023"}/>
</div>
</div>
</div>
<div className="openmmlab_title">项目精选</div>
<ProjectTabs {...props} list={list} />
<ProjectTabs {...props} list={list} year={pathname.endsWith("/2022") ? "2022" : "2023"}/>
<div className="teachers">
{pathname.endsWith("/2022") && <div className="teachers">
<div className="teachers_tit">
导师一览
</div>
<Teachers />
</div>
</div>}
</div>
)
}

View File

@ -7,7 +7,7 @@ const $ = window.$;
const { TabPane } = Tabs;
function ProjectTabs({ list, applyTaskId, history, current_user, showLoginDialog, applyTask }) {
function ProjectTabs({ list, applyTaskId, history, current_user, showLoginDialog, applyTask, year, period }) {
useEffect(()=>{
setTimeout(()=>{
@ -16,7 +16,6 @@ function ProjectTabs({ list, applyTaskId, history, current_user, showLoginDialog
},(e)=>{
});
},1000)
},[])
return (
@ -34,7 +33,7 @@ function ProjectTabs({ list, applyTaskId, history, current_user, showLoginDialog
key={i + ''} >
<div className="tab_content">
<div className="openmmlab_tab_content">
<ProjectDetail detail={item} applyTaskId={applyTaskId} current_user={current_user} showLoginDialog={showLoginDialog} applyTask={applyTask}/>
<ProjectDetail detail={item} applyTaskId={applyTaskId} current_user={current_user} showLoginDialog={showLoginDialog} applyTask={applyTask} year={year} period={period}/>
</div>
</div>

View File

@ -1,6 +1,9 @@
.ant-tabs.openmmlab_tab {
background-color: #2c374e;
color: #fff;
.ant-tabs-left-content{
border-left: none;
}
.ant-tabs-bar {
width: calc((100vw - 1200px) / 2 + 216px);
@ -59,7 +62,7 @@
.tab_type {
opacity: .8;
display: block;
width: 72px;
width: 105px;
height: 30px;
border: 1px solid#ffffff;
border-radius: 4px;
@ -85,7 +88,7 @@
}
.openmmlab_tab_content {
width:954px;
height:813px;
// height:813px;
padding: 21px 30px 50px;
// color: rgba(0,0,0,.65);
background-image: url('../../img/openmmlab/tabBackground.png') ;

View File

@ -3,7 +3,7 @@ import { Button, message, Tooltip } from 'antd';
import Nodata from '../../../forge/Nodata';
import { getProjectById } from '../../api';
export default ({ detail, projectId, applyTaskId, applyTask }) => {
export default ({ detail, projectId, applyTaskId, applyTask, year, period }) => {
const [info, setInfo] = useState(detail);
useEffect(()=>{
@ -26,7 +26,7 @@ export default ({ detail, projectId, applyTaskId, applyTask }) => {
{info.registrationTaskList && info.registrationTaskList.length > 0 ? info.registrationTaskList.map((item, index)=>{
return <div className='taskItem mt15' key={index}>
<div className="left">
<div className="taskTitle" onClick={()=>{window.location.href=`/glcc/2022/subjects/detail/${item.id}`}}><Tooltip title={item.taskName}>{item.taskName}</Tooltip></div>
<div className="taskTitle" onClick={()=>{window.location.href=`/glcc/${year}/subjects/detail/${item.id}`}}><Tooltip title={item.taskName}>{item.taskName}</Tooltip></div>
<div className='mt15 oneLine leftWidth'>导师姓名: &nbsp;&nbsp;{item.tutorName}</div>
{item.tutorMail && <div className='mb15 email oneLine leftWidth'>邮箱地址: &nbsp;&nbsp;<span><Tooltip title={item.tutorMail}>{item.tutorMail}</Tooltip></span></div>}
</div>
@ -35,16 +35,16 @@ export default ({ detail, projectId, applyTaskId, applyTask }) => {
{item.taskUrl && <div className="taskUrl oneLine">课题链接: &nbsp;&nbsp;<a href={item.taskUrl} target={"_blank"}>{item.taskUrl}</a></div>}
<div>
{/* 报名详情按钮 */}
{applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && <Button onClick={()=>{window.location.href=`/glcc/student/apply/${item.id}`}} className='lookDetail mr10'>报名详情</Button>}
{year === "2023" && applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && <Button onClick={()=>{window.location.href=`/glcc/student/apply/${item.id}`}} className='lookDetail mr10'>报名详情</Button>}
{/* 课题申请时间范围内: 申请课题 */}
{/* 第一次报名 */}
{false && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && <Button type='primary' className='applyBut mr10' onClick={()=>{applyTask(item.id)}}>申请课题</Button>}
{year === "2023" && period === "stuApply" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && <Button type='primary' className='applyBut mr10' onClick={()=>{applyTask(item.id)}}>申请课题</Button>}
{/* 第二次报名 锁定状态 */}
{false && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && (item.locked ? <Tooltip title={"该课题已有学生入选"}><Button type='primary' className='mr10' disabled>申请课题</Button></Tooltip> : <Button type='primary' className='applyBut mr10' onClick={()=>{applyTask(item.id)}}>申请课题</Button>)}
{year === "2023" && period === "stuApply1" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && (item.locked ? <Tooltip title={"该课题已有学生入选"}><Button type='primary' className='mr10' disabled>申请课题</Button></Tooltip> : <Button type='primary' className='applyBut mr10' onClick={()=>{applyTask(item.id)}}>申请课题</Button>)}
{/* 查看课题详情按钮 */}
<Button onClick={()=>{window.open(`/glcc/subjects/detail/${item.id}`)}} className='lookDetail'>课题详情</Button>
<Button onClick={()=>{window.open(`/glcc/${year}/subjects/detail/${item.id}`)}} className='lookDetail'>课题详情</Button>
</div>
</div>
<div className="right oneLine taskUrl"><span className='taskReward'>{item.taskReward}</span></div>

View File

@ -62,6 +62,59 @@ const arithmeticArr = [
},
];
const arithmeticArr2023 = [
{
name: "MMEngine算法演示",
describe: "MMEngine 是一个基于 PyTorch 实现的,用于训练深度学习模型的基础库。它为开发人员提供了坚实的工程基础,以此避免在工作流上编写冗余代码。作为 OpenMMLab 所有代码库的训练引擎其在不同研究领域支持了上百个算法。此外MMEngine 也可以用于非 OpenMMLab 项目中。",
source: 'https://www.gitlink.org.cn/api/attachments/422473',
type: 'img',
},
{
name: "MMPreTrain算法演示",
describe: "MMPretrain 是一个全新升级的预训练开源算法框架旨在提供各种强大的预训练主干网络并支持不同的预训练策略。MMPretrain 源自著名的开源项目 MMClassification 和 MMSelfSup并开放一系列新功能。 目前,预训练阶段对于视觉识别至关重要,凭借丰富而强大的预训练模型,我们能够改进各种下游视觉任务。",
type: 'img',
source: 'https://www.gitlink.org.cn/api/attachments/422652'
},
{
name: "MMDetection算法演示",
describe: "MMDetection 是 OpenMMLab 中的通用目标检测算法平台,目前已经支持了 70+ 算法和 500+ 个预训练模型,支持目标检测、实例分割和全景分割。是 OpenMMLab 算法库中的MMDetection3D 和 MMRotate 的核心依赖,为 MMOCR、MMPose 和 MMTracking 提供了检测组件",
source: 'https://www.gitlink.org.cn/api/attachments/388003',
type: 'img',
},
{
name: "MMDetection3D算法演示",
describe: "MMDetection3D 是 OpenMMLab 中的通用 3D 感知算法平台,目前已经支持了室内外多个主流数据集的单模态/多模态 3D 检测和点云分割算法。同时 MMDetection3D 可以无缝使用 MMDetection 中的所有组件,为多模态感知提供了丰富的基础模块",
source: 'https://www.gitlink.org.cn/api/attachments/387953',
type: 'img',
},
{
name: "MMSegmentation算法演示",
describe: "MMSegmentation 是 OpenMMLab 中的语义分割算法工具箱,目前已经支持了 49 个算法600+ 个预训练模型。为语义分割任务的统一实现和模型评估提供了一个框架,并且高质量实现了常用的语义分割方法和数据集。",
source: 'https://www.gitlink.org.cn/api/attachments/422474',
type: 'img',
},
{
name: "MMAction2算法演示",
describe: "MMAction2 是一个基于 PyTorch 的开源工具箱,支持众多视频理解模型,包括动作识别、基于骨架的动作识别、时空动作检测和时间动作定位。 此外,它支持广泛使用的学术数据集,并提供许多有用的工具,帮助用户探索模型和数据集,以及实现高质量的算法。",
source: 'https://www.gitlink.org.cn/api/attachments/422475',
type: 'img',
},
{
name: "MMPose算法演示",
describe: "MMPose 是 OpenMMLab 中的姿态估计算法库,目前已经支持了近 30 个算法和 300+ 预训练模型,涵盖了人体、人脸、人手、动物等多类目标的姿态估计。秉承 OpenMMLab 系列的结构化框架设计MMPose 很适合作为算法复现和创新的平台",
source: 'https://www.gitlink.org.cn/api/attachments/388257.mp4',
type: 'mp4',
img: 'https://www.gitlink.org.cn/api/attachments/388256'
},
{
name: "MMagic算法演示",
describe: "MMagic 是 OpenMMLab 中的图像&视频生成和编辑的开源算法平台,涵盖 GANdiffusion model 多种生成模型,支持 Stable Diffusion 的微调和多种 diffusion 应用。同时支持图像修复、图文生成、3D生成、图像修补、抠图、超分辨率和生成等多种任务。利用 MMagic通过组合不同模块轻松构建自定义的生成模型。",
source: 'https://www.gitlink.org.cn/api/attachments/422478.mp4',
img: 'https://www.gitlink.org.cn/api/attachments/422779',
type: 'mp4',
},
];
let setting = {
infinite: true,
dots: true,
@ -76,11 +129,12 @@ let setting = {
autoplay: true,
arrows: false,
}
function SliderLeft() {
function SliderLeft(props) {
const {pathname} = props;
const arr = pathname.endsWith("/2022") ? arithmeticArr : arithmeticArr2023
return (
<Slider {...setting}>
{arithmeticArr.map(item => {
{arr.map(item => {
return <div className="slider_content" key={item.name}>
<div className={`slider_img ${item.name.split('算法演示')[0]}`} >
{item.type == 'img' && <img src={item.source} />}
@ -97,8 +151,8 @@ function SliderLeft() {
{
item.name === 'MMDetection3D算法演示' && <div className="point">
<div className="point_item">7 个数据集</div>
<div className="point_item">17 种不同算法</div>
<div className="point_item">80+ 个预训练模型</div>
<div className="point_item">{pathname.endsWith("/2022") ? "17" : "30+"} 种不同算法</div>
<div className="point_item">{pathname.endsWith("/2022") ? "80" : "90"}+ 个预训练模型</div>
</div>
}
</div>

View File

@ -90,6 +90,9 @@
// max-height: 100%;
}
}
.MMagic .introduce-video{
max-height: 112%;
}
.MMDetection3D,.MMClassification {
padding:30px 0;

View File

@ -17,15 +17,11 @@ let setting = {
vertical: true,
}
function SliderLeft({list,history}) {
function SliderLeft({list,year}) {
function goDetail(projectName){
// history.push({
// pathname:'/glcc/projects',
// state:{projectName:projectName.replace(/ /g,'-')}
// })
window.open(`/glcc/2022/projects?projectName=${projectName.replace(/ /g,'')}`);
window.open(`/glcc/${year}/projects?projectName=${projectName.replace(/ /g,'')}`);
}
return (

View File

@ -39,13 +39,13 @@ export default ({ detail, projectId, applyTaskId, period, showTask=true, applyTa
{item.taskUrl && <div className="taskUrl oneLine">课题链接: &nbsp;&nbsp;<a href={item.taskUrl} target={"_blank"}>{item.taskUrl}</a></div>}
<div>
{/* 报名详情按钮 */}
{applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && <Button onClick={()=>{window.location.href=`/glcc/student/apply/${item.id}`}} className='lookDetail mr10'>报名详情</Button>}
{round === 2 && applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && <Button onClick={()=>{window.location.href=`/glcc/student/apply/${item.id}`}} className='lookDetail mr10'>报名详情</Button>}
{/* 课题申请时间范围内: 申请课题 */}
{/* 第一次报名 */}
{period === "stuApply" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && <Button type='primary' className='applyBut mr10' onClick={()=>{applyTask(item.id)}}>申请课题</Button>}
{round === 2 && period === "stuApply" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && <Button type='primary' className='applyBut mr10' onClick={()=>{applyTask(item.id)}}>申请课题</Button>}
{/* 第二次报名 锁定状态 */}
{period === "stuApply1" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && (item.locked ? <Tooltip title={"该课题已有学生入选"}><Button type='primary' className='mr10' disabled>申请课题</Button></Tooltip> : <Button type='primary' className='applyBut mr10' onClick={()=>{applyTask(item.id)}}>申请课题</Button>)}
{round === 2 && period === "stuApply1" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && (item.locked ? <Tooltip title={"该课题已有学生入选"}><Button type='primary' className='mr10' disabled>申请课题</Button></Tooltip> : <Button type='primary' className='applyBut mr10' onClick={()=>{applyTask(item.id)}}>申请课题</Button>)}
{/* 查看课题详情按钮 */}
<Button onClick={()=>{window.open(`/glcc/${id}/subjects/detail/${item.id}`)}} className='lookDetail'>课题详情</Button>

View File

@ -7,7 +7,7 @@ import './index.scss';
//
function TaskDetail(props) {
const {match, location, period, applyTaskId, applyTask, match:{params:{id}}} = props
const {match, location, period, applyTaskId, applyTask, match:{params:{id}}, currentRound, round} = props
const taskId = Number(match.params.taskId);
const [detail, setDetail] = useState(undefined);
@ -48,13 +48,13 @@ function TaskDetail(props) {
<div className='desc'>{detail.taskDesc}</div>
</div>
{/* 报名详情按钮 */}
{applyTaskId && Object.keys(applyTaskId).includes(taskId.toString()) && <Button onClick={()=>{window.location.href=`/glcc/student/apply/${taskId}`}} className='lookDetail detailBut'>报名详情</Button>}
{round === currentRound && applyTaskId && Object.keys(applyTaskId).includes(taskId.toString()) && <Button onClick={()=>{window.location.href=`/glcc/student/apply/${taskId}`}} className='lookDetail detailBut'>报名详情</Button>}
{/* 课题申请时间范围内: 申请课题 */}
{/* 第一次报名 */}
{period==="stuApply" && !(applyTaskId && Object.keys(applyTaskId).includes(taskId.toString())) && <Button type='primary' className='applyBut detailBut' onClick={()=>{applyTask(taskId)}}>申请课题</Button>}
{round === currentRound && period==="stuApply" && !(applyTaskId && Object.keys(applyTaskId).includes(taskId.toString())) && <Button type='primary' className='applyBut detailBut' onClick={()=>{applyTask(taskId)}}>申请课题</Button>}
{/* 第二次报名 锁定状态 */}
{period === "stuApply1" && !(applyTaskId && Object.keys(applyTaskId).includes(taskId.toString())) && (detail.locked ? <Tooltip title={"该课题已有学生入选"}><Button type='primary' className='mr10 detailBut' disabled>申请课题</Button></Tooltip> : <Button type='primary' className='applyBut mr10 detailBut' onClick={()=>{applyTask(taskId)}}>申请课题</Button>)}
{round === currentRound && period === "stuApply1" && !(applyTaskId && Object.keys(applyTaskId).includes(taskId.toString())) && (detail.locked ? <Tooltip title={"该课题已有学生入选"}><Button type='primary' className='mr10 detailBut' disabled>申请课题</Button></Tooltip> : <Button type='primary' className='applyBut mr10 detailBut' onClick={()=>{applyTask(taskId)}}>申请课题</Button>)}
</div>
<img src={bgPng} alt='' className='bgPng1'/>
<img src={bgPng} alt='' className='bgPng2'/>

View File

@ -7,7 +7,7 @@ import bgPng from "../../img/bgPng.png";
const { Search } = Input;
//
function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDialog,cancelCount,showNotification, applyTask, round, match:{params:{id}}, period }) {
function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDialog,cancelCount,showNotification, applyTask, round, match:{params:{id}}, period, currentRound }) {
const [visible, setVisible] = useState(false);
const [deleteTaskId, setDeleteTaskId] = useState(undefined);
//
@ -33,16 +33,16 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial
return (
<div className='actionBox'>
{/* 报名详情按钮 */}
{applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && <span onClick={()=>{window.location.href=`/glcc/student/apply/${item.id}`}}><i className='iconfont icon-baomingxiangqingicon mr5'></i>报名详情</span>}
{round === currentRound && applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && <span onClick={()=>{window.location.href=`/glcc/student/apply/${item.id}`}}><i className='iconfont icon-baomingxiangqingicon mr5'></i>报名详情</span>}
{/* 取消按钮5.26-6.25 */}
{(period === "stuApply" || period === "stuApply1") && applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && <Tooltip title={"取消申请"}><i className='iconfont icon-shanchuicon3 ml20 cancelApply' onClick={()=>{deleteItem(item.id)}}></i></Tooltip>}
{round === currentRound && (period === "stuApply" || period === "stuApply1") && applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && <Tooltip title={"取消申请"}><i className='iconfont icon-shanchuicon3 ml20 cancelApply' onClick={()=>{deleteItem(item.id)}}></i></Tooltip>}
{/* 课题申请时间范围内: 申请课题 */}
{/* 第一次报名 */}
{period === "stuApply" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && <span onClick={()=>{applyTask(item.id)}}><i className='iconfont icon-shenqingketiicon applyTask mr5'></i><span className='applyTask'>申请课题</span></span>}
{round === currentRound && period === "stuApply" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && <span onClick={()=>{applyTask(item.id)}}><i className='iconfont icon-shenqingketiicon applyTask mr5'></i><span className='applyTask'>申请课题</span></span>}
{/* 第二次报名 锁定状态 */}
{period === "stuApply1" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && (item.locked ? <Tooltip title={"该课题已有学生入选"}><span className='disabled'><i className='iconfont icon-shenqingketiicon mr5 disabled'></i><span className='disabled'>申请课题</span></span></Tooltip> : <span onClick={()=>{applyTask(item.id, item.locked)}}><i className='iconfont icon-shenqingketiicon applyTask mr5'></i><span className='applyTask'>申请课题</span></span>)}
{round === currentRound && period === "stuApply1" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && (item.locked ? <Tooltip title={"该课题已有学生入选"}><span className='disabled'><i className='iconfont icon-shenqingketiicon mr5 disabled'></i><span className='disabled'>申请课题</span></span></Tooltip> : <span onClick={()=>{applyTask(item.id, item.locked)}}><i className='iconfont icon-shenqingketiicon applyTask mr5'></i><span className='applyTask'>申请课题</span></span>)}
</div>
)
})