Merge remote-tracking branch 'upstream/gitlink_ssr_head' into gitlink_ssr_head
|
|
@ -56,4 +56,4 @@ export const deepRoutes = [
|
|||
]
|
||||
|
||||
// 不进行组织或个人判断
|
||||
export const specialRoute = ["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", "undefined", "admins", "oauth", "competitions", "hiagent","softwareFactory"]
|
||||
export const specialRoute = ["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", "undefined", "admins", "oauth", "competitions", "hiagent","softwareFactory","forums"]
|
||||
|
|
@ -1798,6 +1798,10 @@ a.decoration {
|
|||
margin-left: 180px
|
||||
}
|
||||
|
||||
.mrat{
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.mr3 {
|
||||
margin-right: 3px
|
||||
}
|
||||
|
|
|
|||
16
src/App.js
|
|
@ -168,8 +168,13 @@ const Iframe = Loadable({
|
|||
loading: Loading,
|
||||
});
|
||||
|
||||
const Incentiveprogram = Loadable({
|
||||
loader: () => import('./activity/incentiveprogram'),
|
||||
loading: Loading,
|
||||
});
|
||||
|
||||
// 此处仅维护前端可能的一级路由,不用进行项目或者组织判断的字段。
|
||||
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", "hiagent","softwareFactory"];
|
||||
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", "hiagent","softwareFactory", "incentiveprogram"];
|
||||
|
||||
class App extends Component {
|
||||
constructor(props) {
|
||||
|
|
@ -359,6 +364,15 @@ class App extends Component {
|
|||
{
|
||||
pathType ?
|
||||
<Switch>
|
||||
{/* 活动 */}
|
||||
<Route
|
||||
path={"/incentiveprogram"}
|
||||
render={
|
||||
(props) => {
|
||||
return (<Incentiveprogram {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
}>
|
||||
</Route>
|
||||
{/* iframe页面 */}
|
||||
<Route path="/hiagent"
|
||||
render={
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@ export function initAxiosInterceptors(props) {
|
|||
if (window.location.port === "3007") {
|
||||
config.url = `${proxy}${url}`;
|
||||
if (config.url.indexOf('?') === -1) {
|
||||
config.url = `${config.url}?debug=admin`;
|
||||
config.url = `${config.url}`;
|
||||
} else {
|
||||
config.url = `${config.url}&debug=admin`;
|
||||
config.url = `${config.url}`;
|
||||
}
|
||||
} else {
|
||||
config.url = url;
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 813 KiB |
|
After Width: | Height: | Size: 1.7 MiB |
|
After Width: | Height: | Size: 639 KiB |
|
After Width: | Height: | Size: 2.1 MiB |
|
After Width: | Height: | Size: 551 B |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 272 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
|
@ -0,0 +1,70 @@
|
|||
import React, { Fragment, useEffect } from "react";
|
||||
import { TPMIndexHOC } from "../../modules/tpm/TPMIndexHOC";
|
||||
import "./index.scss";
|
||||
import { Divider, Icon } from "antd";
|
||||
import Light from "./light";
|
||||
import Project from "./project";
|
||||
import Time from "./time";
|
||||
|
||||
function Incentiveprogram(props) {
|
||||
|
||||
useEffect(() => {
|
||||
document.title = "开源激励计划";
|
||||
}, []);
|
||||
|
||||
|
||||
const applyList = [
|
||||
{
|
||||
title: "开源项目报名",
|
||||
desc: "原创开源项目,初始版本已经发布半年以上",
|
||||
img: require("../image/item2.png"),
|
||||
link: "https://v.wjx.cn/vm/wJn3xMO.aspx"
|
||||
},
|
||||
{
|
||||
title: "开源课程报名",
|
||||
desc: "开源相关课程,且己建立一年以上",
|
||||
img: require("../image/item3.png"),
|
||||
link: "https://v.wjx.cn/vm/YDgW8US.aspx"
|
||||
},
|
||||
{
|
||||
title: "开源贡献者报名",
|
||||
desc: "在开源项目中做过出色贡献",
|
||||
img: require("../image/item4.png"),
|
||||
link: "https://v.wjx.cn/vm/PpwVfuw.aspx"
|
||||
}
|
||||
]
|
||||
|
||||
return <div className="incentiveprogram_box">
|
||||
<div className="banner_Incentiveprogram">
|
||||
<div className="banner_item_box">
|
||||
<span className="banner_item_1 color-white">
|
||||
<img src={require("../image/item1.png")} alt="" width={12} className="mr5 mb3"/>
|
||||
汇聚优质成果
|
||||
</span>
|
||||
<div className="font-40 color-091" style={{fontFamily: "ziyouwenyihei"}}>开源激励计划·赋能<span className="banner_item_2">优质开源成果</span></div>
|
||||
<div className="opacity8 color-091 center">CCF开源发展技术委员会 <Icon type="close" className="font-12"/> 天工开物开源基金会 联合发起</div>
|
||||
</div>
|
||||
<div className="df main_Incentiveprogram apply_item_box_list">
|
||||
{applyList.map((item, index) =>{
|
||||
return <Fragment key={index}>
|
||||
<div className="apply_item_box" key={index}>
|
||||
<img src={item.img} alt="" width={30}/>
|
||||
<div className="apply_item_title color-091 font-18 font-bd mt3 mb2 pointer" onClick={()=>{
|
||||
window.open(item.link)
|
||||
}}>{item.title}</div>
|
||||
<div className="color-091">{item.desc}</div>
|
||||
</div>
|
||||
{index !== applyList.length - 1 && <Divider type="vertical" style={{height: 'auto'}} />}
|
||||
</Fragment>
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
<Light/>
|
||||
<div className="project_bk_color">
|
||||
<Project/>
|
||||
</div>
|
||||
<Time/>
|
||||
</div>;
|
||||
}
|
||||
|
||||
export default TPMIndexHOC(Incentiveprogram);
|
||||
|
|
@ -0,0 +1,195 @@
|
|||
.opacity7 {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.opacity8 {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.color-091 {
|
||||
color: #091221;
|
||||
}
|
||||
|
||||
.main_Incentiveprogram {
|
||||
width: 1600px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.gap10 {
|
||||
gap: 10px
|
||||
}
|
||||
|
||||
.gap20 {
|
||||
gap: 20px
|
||||
}
|
||||
|
||||
.jsb {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.banner_Incentiveprogram {
|
||||
background-image: url('../image/banner.png');
|
||||
background-size: 100% 100%;
|
||||
padding: 100px 0 50px;
|
||||
|
||||
.banner_item_box {
|
||||
width: 600px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.banner_item_1 {
|
||||
padding: 10px 20px;
|
||||
background-image: linear-gradient(132.09deg, #4689ff 0%, #5182ff 28.18%, #b546ff 100%);
|
||||
border-radius: 0px 20px 0px 20px;
|
||||
}
|
||||
|
||||
.banner_item_2 {
|
||||
// 字体颜色渐变
|
||||
background-image: linear-gradient(132.09deg, #4689ff 0%, #5182ff 28.18%, #b546ff 100%);
|
||||
background-clip: text;
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
|
||||
.apply_item_box_list {
|
||||
background-image: url('../image/item5.png');
|
||||
background-size: 100% 100%;
|
||||
justify-content: space-around;
|
||||
padding: 50px 0 32px;
|
||||
margin-top: 70px;
|
||||
}
|
||||
|
||||
.apply_item_box {
|
||||
&:hover .apply_item_title {
|
||||
color: #466aff;
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
content: '\e9a5';
|
||||
font-family: 'iconfont';
|
||||
position: absolute;
|
||||
margin-left: 8px;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.light_Incentiveprogram {
|
||||
background-image: url('../image/banner2.png');
|
||||
background-size: 100% 100%;
|
||||
padding-bottom: 110px;
|
||||
|
||||
.light_box {
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.light_item {
|
||||
background-color: #ffffff;
|
||||
border-radius: 10px;
|
||||
padding: 45px 40px;
|
||||
transition: all 0.5s ease-in-out;
|
||||
|
||||
&.active {
|
||||
background-image: url('../image/item6.png');
|
||||
background-size: 100% 100%;
|
||||
color: white;
|
||||
|
||||
.tag_light {
|
||||
color: #091221;
|
||||
background-color: #f6f7fa;
|
||||
transition: all 0.5s ease-in-out;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tag_light {
|
||||
background-color: #f6f7fa;
|
||||
border-radius: 4px;
|
||||
padding: 2px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.project_bk_color {
|
||||
background: linear-gradient(to bottom, #EFF5FF 0%, #E8F9FF 50%, #ffffff 50%, #ffffff 100%);
|
||||
}
|
||||
|
||||
.project_Incentiveprogram {
|
||||
background-image: url('../image/banner3.png');
|
||||
background-size: 100% 100%;
|
||||
padding-top: 40px;
|
||||
padding-bottom: 80px;
|
||||
|
||||
.white_bk {
|
||||
background-color: #ffffff;
|
||||
border-radius: 30px;
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
.blue_item {
|
||||
background-image: linear-gradient(180deg, rgba(70, 106, 255, 0.2) 0%, #ffffff 100%);
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.project_item_inc {
|
||||
width: 230px;
|
||||
|
||||
&+.ant-divider.ant-divider-vertical {
|
||||
top: 1.94em;
|
||||
height: 100px;
|
||||
background: none;
|
||||
background-image: linear-gradient(180deg, rgba(9, 18, 33, 0) 0%, rgba(9, 18, 33, 0.1) 52.72%, rgba(90, 96, 106, 0) 100%);
|
||||
}
|
||||
}
|
||||
|
||||
.project_tag {
|
||||
color: white;
|
||||
background-image: linear-gradient(116.57deg, #466aff 0%, #a052ff 100%);
|
||||
border-radius: 8px;
|
||||
padding: 10px;
|
||||
margin-top: 35px;
|
||||
}
|
||||
|
||||
.project_item_right {
|
||||
height: 47.8%;
|
||||
gap: 15px;
|
||||
|
||||
.blue_item_2 {
|
||||
line-height: 38px;
|
||||
padding: 17px;
|
||||
}
|
||||
}
|
||||
|
||||
.project_item_right_1 .blue_item {
|
||||
width: 110px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.time_Incentiveprogram {
|
||||
background-image: url('../image/banner4.png');
|
||||
background-size: 100% 100%;
|
||||
padding-bottom: 80px;
|
||||
|
||||
.time_2_inc {
|
||||
border-radius: 10px;
|
||||
background: rgba(255, 255, 255, 0.45);
|
||||
backdrop-filter: blur(0px);
|
||||
}
|
||||
|
||||
.time_item_Inc {
|
||||
flex: 0 0 calc(21.5%);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1400px) {
|
||||
.main_Incentiveprogram {
|
||||
width: 1200px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.main_Incentiveprogram {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
import React, { useState, useEffect } from "react";
|
||||
|
||||
// 活动亮点
|
||||
function Light() {
|
||||
const [active, setActive] = useState(0);
|
||||
// 三秒切换list的高亮显示元素
|
||||
|
||||
|
||||
const list = [
|
||||
{
|
||||
img: require("../image/item7.png"),
|
||||
title: "三大激励类别",
|
||||
desc: "年度评选涵盖优秀开源项目、优秀开源课程及优秀开源贡献者,全面激励开源生态的创新与协作",
|
||||
tags: ["开源项目", "开源课程", "开源贡献者"]
|
||||
}, {
|
||||
img: require("../image/item8.png"),
|
||||
title: "激励金额与资源扩展",
|
||||
desc: "激励金总额达20万以上,并持续引入更多企业资源,设立多样化赛道,推动开源事业蓬勃发展",
|
||||
tags: ["现有激励金:20万", " 更多合作资源"]
|
||||
}, {
|
||||
img: require("../image/item7.png"),
|
||||
title: "开源生态共建",
|
||||
desc: "通过评选挖掘优质开源成果,汇聚行业力量,为技术社区注入新活力与可持续发展动力",
|
||||
tags: ["挖掘优质成果", "汇聚行业资源"]
|
||||
}, {
|
||||
img: require("../image/item8.png"),
|
||||
title: "未来展望",
|
||||
desc: "不断丰富激励形式与资源支持,打造更具影响力的开源激励平台,助力全球技术创新",
|
||||
tags: ["持续丰富激励", "打造标杆平台"]
|
||||
}
|
||||
];
|
||||
|
||||
useEffect(() => {
|
||||
const interval = setInterval(() => {
|
||||
setActive(prevActive => (prevActive + 1) % list.length);
|
||||
}, 4000);
|
||||
|
||||
return () => clearInterval(interval);
|
||||
}, [list.length]);
|
||||
|
||||
return (
|
||||
<div className="light_Incentiveprogram">
|
||||
<div className="main_Incentiveprogram color-091">
|
||||
<div className="font-36 font-bd center mb50 mt15">活动亮点</div>
|
||||
<div className="df light_box">
|
||||
{list.map((item, index) => {
|
||||
return <div
|
||||
key={index}
|
||||
className={`light_item ${index === active ? 'active' : ''}`}
|
||||
onClick={() => setActive(index)}
|
||||
>
|
||||
<img src={item.img} alt="" width={40}/>
|
||||
<div className="font-20 font-bd mt15 mb25">{item.title}</div>
|
||||
<div className="mb40">{item.desc}</div>
|
||||
<div className="df gap10">
|
||||
{item.tags.map((tag, i) => {
|
||||
return <span key={`${index}_${i}`} className="font-12 opacity7 tag_light">{tag}</span>
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Light;
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
import { Divider } from "antd";
|
||||
import React, { useState, useEffect, Fragment } from "react";
|
||||
|
||||
// 征集开源项目
|
||||
function Project() {
|
||||
|
||||
const list = [
|
||||
{
|
||||
img: require("../image/item9.png"),
|
||||
title: "面向对象",
|
||||
desc: "面向社会征集\n开源创新成果和开源贡献",
|
||||
tags: "提升优质开源成果价值"
|
||||
}, {
|
||||
img: require("../image/item9.png"),
|
||||
title: "成果类型",
|
||||
desc: "开源原创项目.开源\n课程/数字教材、开源贡献",
|
||||
tags: "多样化方式参与开源"
|
||||
}, {
|
||||
img: require("../image/item9.png"),
|
||||
title: "依托平台",
|
||||
desc: "所有项目要求在GitLink\n平台以开源开放的形式发布",
|
||||
tags: "GitLink平台持续公益开源支持"
|
||||
}
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="project_Incentiveprogram">
|
||||
<div className="main_Incentiveprogram color-091">
|
||||
<div className="font-36 font-bd center mb50 mt15">征集开源项目</div>
|
||||
<div className="df gap20">
|
||||
<div className="white_bk" style={{width: '54%'}}>
|
||||
<div className="font-30 font-bd center mb50 pt10">征集开源项目</div>
|
||||
<div className="df jsb pb15">
|
||||
{list.map((item, index) => {
|
||||
return <Fragment>
|
||||
<div className="project_item_inc center" key={index}>
|
||||
<img src={item.img} alt="" width={36} />
|
||||
<div className="font-16 font-bd mt12 mb10">{item.title}</div>
|
||||
<div style={{ whiteSpace: 'pre-line' }}>{item.desc}</div>
|
||||
<div className="project_tag">{item.tags}</div>
|
||||
</div>
|
||||
{index !== list.length - 1 && <Divider type="vertical" />}
|
||||
</Fragment>
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex1">
|
||||
<div className="df white_bk mb20 project_item_right project_item_right_1">
|
||||
<div className="pt30 mrat">
|
||||
<span className="font-30 font-bd mb50">激励金</span><br />
|
||||
<span>创新开源项目/开源课程/开源贡献</span>
|
||||
</div>
|
||||
<div className="blue_item font-13 pt30">
|
||||
<span className="color-blue font-16">A等</span><br />
|
||||
<span>1名<br />激励金2万</span>
|
||||
</div>
|
||||
<div className="blue_item font-13 pt30">
|
||||
<span className="color-blue font-16">B等</span><br />
|
||||
<span>3名<br />激励金0.5万</span>
|
||||
</div>
|
||||
<div className="blue_item pt50">
|
||||
......
|
||||
</div>
|
||||
</div>
|
||||
<div className="white_bk df project_item_right">
|
||||
<div className="pt30 mrat">
|
||||
<span className="font-30 font-bd mb50 task-hide">年度评审与激励</span><br />
|
||||
<span>创新开源项目/开源课程/开源贡献</span>
|
||||
</div>
|
||||
<div className="blue_item blue_item_2 font-13">
|
||||
<span className="color-blue font-16 mr15">申请渠道</span>GitLink<br />
|
||||
<span className="color-blue font-16 mr15">评选方式</span>成果开源、持续贡献、年度申报、专家评审<br />
|
||||
<span className="color-blue font-16 mr15">激励形式</span>荣誉证书 + 现金激励<br />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Project;
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
import { Divider } from "antd";
|
||||
import React, { useState, useEffect, Fragment } from "react";
|
||||
|
||||
// 时间规划
|
||||
function Time() {
|
||||
|
||||
const list = [
|
||||
{
|
||||
title: "计划正式启动",
|
||||
desc: "LAUNCHED",
|
||||
}, {
|
||||
title: "开源贡献实践",
|
||||
desc: "ENGAGEMENT",
|
||||
}, {
|
||||
title: "报名截止",
|
||||
desc: "DEADLINE",
|
||||
}, {
|
||||
title: "激励评审",
|
||||
desc: "EVALUATION",
|
||||
}, {
|
||||
title: "激励发放",
|
||||
desc: "AWARD",
|
||||
}
|
||||
];
|
||||
|
||||
const list1 = [
|
||||
{
|
||||
title: "2025年11月28日",
|
||||
desc: "报名通道将于近日开放,\n最新动态请持续关注官网通知",
|
||||
}, {
|
||||
title: "2025年11月起",
|
||||
desc: "鼓励长期持续参与开源贡献,\n开源贡献时长为核心评选标准之一",
|
||||
}, {
|
||||
title: "2026年5月30日",
|
||||
desc: "需在截止前在GitLink平台开源,\n平台活跃度将作为评选加分项",
|
||||
}, {
|
||||
title: "2026年6-7月",
|
||||
desc: "由CCF开源发展技术委员会激励\n计划评审委员会专业审议,确保公平公正",
|
||||
}, {
|
||||
title: "2026年8月",
|
||||
desc: "激励(荣誉部分)预计在2026\nCCF中国开源大会现场统一颁发",
|
||||
}
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="time_Incentiveprogram">
|
||||
<div className="main_Incentiveprogram color-091 pt60">
|
||||
<div className="font-36 font-bd center mb50 mt15">时间规划</div>
|
||||
<div className="df jsb padding30">
|
||||
{list.map((item, index) => (
|
||||
<div className="time_item_Inc" key={index}>
|
||||
<div className="font-18 font-bd">{item.title}</div>
|
||||
<div className="font-12 mt5 mb20">{item.desc}</div>
|
||||
<img src={require("../image/item10.png").default} alt="" width={186} />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<div className="df jsb padding30 time_2_inc mt10">
|
||||
{list1.map((item, index) => (
|
||||
<div className="time_item_Inc" key={index}>
|
||||
<span className="font-16">{item.title}</span>
|
||||
<div style={{ whiteSpace: 'pre-line' }} className="mt5">{item.desc}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Time;
|
||||
|
|
@ -203,7 +203,7 @@ class NewHeader extends Component {
|
|||
response.data.data.forEach((e, i) => {
|
||||
newArray[i] = {
|
||||
name: e.name,
|
||||
link: `/zone/${e.key}`
|
||||
link: e.key.toLocaleLowerCase() === "incentiveprogram" ? `/incentiveprogram` : `/zone/${e.key}`
|
||||
}
|
||||
});
|
||||
this.setState({ zoneList: newArray })
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ function PublicBanner(props) {
|
|||
const vip = /[A-Za-z0-9]{0,}\/VIP/g;
|
||||
const help = /[A-Za-z0-9]{0,}\/help/g;
|
||||
const dataset = /[A-Za-z0-9]{0,}\/dataset/g;
|
||||
const lesson = /[A-Za-z0-9]{0,}\/lessons/g;
|
||||
if (pathname === `/zone/${deptId}`) {
|
||||
setKey("1");
|
||||
}
|
||||
|
|
@ -53,6 +54,8 @@ function PublicBanner(props) {
|
|||
}
|
||||
else if (dataset.test(pathname)) {
|
||||
setKey("9");
|
||||
}else if(lesson.test(pathname)) {
|
||||
setKey("10");
|
||||
}
|
||||
}
|
||||
}, [pathname])
|
||||
|
|
@ -154,6 +157,7 @@ function PublicBanner(props) {
|
|||
{sectionResourceShow && <Menu.Item key={"3"}><Link to={`/zone/${deptId}/source`}><img src={require(`../img/${temp}Menu3.png`)} alt="" width="33px" />{sectionResourceTitle}</Link></Menu.Item>}
|
||||
{sectionCmsShow && <Menu.Item key={"4"}><Link to={`/zone/${deptId}/news`}><img src={require(`../img/${temp}Menu4.png`)} alt="" width="32px" />{sectionCmsTitle}</Link></Menu.Item>}
|
||||
{/* <Menu.Item key={"5"}><img src={Menu5} alt="" width="27px"/>Sig小组</Menu.Item> */}
|
||||
{isNSCC && <Menu.Item key={"10"}><Link to={`/zone/${deptId}/lessons`}><img src={require(`../img/${temp}Menu10.png`)} alt="" width="36px" />课程实训</Link></Menu.Item>}
|
||||
{sectionMemberShow && <Menu.Item key={"6"}><Link to={`/zone/${deptId}/VIP`}><img src={require(`../img/${temp}Menu6.png`)} alt="" width="36px" />{sectionMemberTitle}</Link></Menu.Item>}
|
||||
{sectionHelperShow && <Menu.Item key={"8"}><Link to={`/zone/${deptId}/help`}><img src={require(`../img/${temp}Menu8.png`)} alt="" width="36px" />{data.sectionHelperTitle}</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>}
|
||||
|
|
|
|||
|
|
@ -1,67 +1,38 @@
|
|||
import React , { useEffect, useState } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { getDirListById, getSubDocList, gethomePageDocList } from '../../../api';
|
||||
import { Badge, Col, Icon, Row } from 'antd';
|
||||
import dirpng from '../image/new3.png'
|
||||
import new4 from '../image/new4.png';
|
||||
import new5 from '../image/new5.png';
|
||||
import new6 from '../image/new6.png';
|
||||
import new7 from '../image/new7.png';
|
||||
import new8 from '../image/new8.png';
|
||||
import new9 from '../image/new9.png';
|
||||
import new10 from '../image/new10.png';
|
||||
import new11 from '../image/new11.png';
|
||||
import new12 from '../image/new12.png';
|
||||
import new13 from '../image/new13.png';
|
||||
import { getSubDocList, gethomePageDocList } from '../../../api';
|
||||
import img1 from '../../../img/img1.png';
|
||||
import '../index.scss';
|
||||
import Nodata from '../../../../Nodata';
|
||||
import uosIcon from '../image/uosIcon.png'
|
||||
import "slick-carousel/slick/slick.css";
|
||||
import "slick-carousel/slick/slick-theme.css";
|
||||
import Slider from 'react-slick';
|
||||
import Left from '../../../../../home/Img/left.png';
|
||||
import Right from '../../../../../home/Img/right.png';
|
||||
import guideArrow from '../../../img/guideArrow.png';
|
||||
import "../../../indexZonebyCCF.scss";
|
||||
|
||||
function News({data, subTitle, firstDirIntro, secondDirIntro}) {
|
||||
const {firstTitle, key, homepageCmsTitle, id} = data || {};
|
||||
const logoByName = {
|
||||
"智慧城市OS": new4,
|
||||
"智慧交通OS": new5,
|
||||
"智慧建设OS": new6,
|
||||
"机器人OS": new7,
|
||||
"智能家居OS": new8,
|
||||
"桌面OS": new9,
|
||||
"服务器OS": new10,
|
||||
"移动智能终端OS": new11,
|
||||
"嵌入式及物联网OS": new12,
|
||||
"云OS": new13
|
||||
function News({data, subTitle , match }) {
|
||||
const { key, homepageCmsTitle, id} = data || {};
|
||||
const { deptId } = match.params;
|
||||
const [ newsList, setNewsList ] = useState({});
|
||||
const [tag,setTag] = useState(0);
|
||||
const setting = {
|
||||
dots: true,
|
||||
infinite: true,
|
||||
speed: 2000,
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 1,
|
||||
pauseOnDotsHover: true,
|
||||
autoplaySpeed: 5000,
|
||||
pauseOnFocus: true,
|
||||
autoplay: true,
|
||||
arrows: true,
|
||||
prevArrow: <img className='slick-prev slick-arrow' src={Left} width="70px" alt="" />,
|
||||
nextArrow: <img className='slick-prev slick-arrow' src={Right} width="70px" alt="" />,
|
||||
afterChange: (index)=> setTag(index)
|
||||
}
|
||||
const [dirList, setDirList] = useState([]);
|
||||
const firstDir = dirList[0];
|
||||
const secondDir = dirList[1];
|
||||
const dirs = dirList.slice(2)
|
||||
|
||||
// const rows = Math.ceil(dirs.length / 6);
|
||||
const [docListByFirstDir, setDocListByFirstDir] = useState([]);
|
||||
const [docListBySecondDir, setDocListBySecondDir] = useState([]);
|
||||
const [docListByDir, setDocListByDir] = useState([]);
|
||||
const [activeDirId, setActiveDirId] = useState(undefined);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [showNew, setShowNew] = useState({});
|
||||
|
||||
// useEffect(()=>{
|
||||
// id && getDirListById(id).then(res=>{
|
||||
// if(res){
|
||||
// const rows = res.data.rows
|
||||
// setDirList(rows);
|
||||
// // 获取第一个栏目的第一条文章
|
||||
// rows[0] && getDocById(rows[0].id, 1, (data)=>{
|
||||
// setDocListByFirstDir(data)
|
||||
// })
|
||||
// // 获取第2个栏目的第一条文章
|
||||
// rows[1] && getDocById(rows[1].id, 8, (data)=>{
|
||||
// setDocListBySecondDir(data)
|
||||
// })
|
||||
// rows[2] && setActiveDirId(rows[2].id)
|
||||
// }
|
||||
// })
|
||||
// }, [id])
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
if(id){
|
||||
|
|
@ -69,135 +40,67 @@ function News({data, subTitle, firstDirIntro, secondDirIntro}) {
|
|||
}
|
||||
},[ id ])
|
||||
|
||||
useEffect(()=>{
|
||||
activeDirId && getDocById(activeDirId, 4, (data)=>{
|
||||
setDocListByDir(data)
|
||||
}, (data)=>{setTotal(data)})
|
||||
}, [activeDirId])
|
||||
|
||||
// 根据招聘专栏的id获取其栏目下的招聘文章
|
||||
function getDocById(dirId, pageSize=10, setData, setTotal1){
|
||||
getSubDocList(dirId,{pageSize:pageSize,pageNum:1,auditStatus:1}).then(result=>{
|
||||
if(result && result.data.rows){
|
||||
let rows = result.data.rows;
|
||||
setData(rows);
|
||||
setTotal1 && setTotal1(result.data.total)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const getNewsList = () => {
|
||||
gethomePageDocList(id).then(result=>{
|
||||
if(result && result.data.rows && result.data.rows[0]){
|
||||
setShowNew(result.data.rows[0]);
|
||||
gethomePageDocList(id).then(result => {
|
||||
if (result) {
|
||||
setNewsList(result.data.rows);
|
||||
}
|
||||
}).catch(error=>{})
|
||||
}).catch(error => { })
|
||||
}
|
||||
|
||||
const renderItems = () => {
|
||||
const itemsPerRow = 6;
|
||||
let rendered = [];
|
||||
let currentRow = [];
|
||||
|
||||
dirs.forEach((item, index) => {
|
||||
|
||||
// 添加项目到当前行
|
||||
currentRow.push(
|
||||
<div key={item.id} className="center pointer mb20 n_1_dir" onClick={()=>{setActiveDirId(item.id)}}>
|
||||
<img src={logoByName[item.name] || new4} width={86}/>
|
||||
<p className={activeDirId === item.id && "activeDir pb3"}>{item.name}</p>
|
||||
</div>
|
||||
);
|
||||
|
||||
// 如果达到每行项目数或是最后一个项目
|
||||
if ((index + 1) % itemsPerRow === 0 || index === dirs.length - 1) {
|
||||
// 将当前行添加到渲染列表
|
||||
rendered = rendered.concat(currentRow);
|
||||
|
||||
if (currentRow.some(item => item.key === activeDirId?.toString())) {
|
||||
rendered.push(
|
||||
<div className=' mt30 pl15 pr15' key="doc" style={{flex: "0 0 100%", overflow: 'hidden'}}>
|
||||
<div className='df wrap between'>
|
||||
{docListByDir.map(item=>{
|
||||
return <div className='docDetailByNews_1 mb20'>
|
||||
<Link to={`/zone/${key}/newdetail/${item.id}`} className="font-15">
|
||||
<Badge color="#466AFF"/>
|
||||
<span className='pl5'>{item.name}</span>
|
||||
</Link>
|
||||
<p className='task-hide color777'>{item.summary}</p>
|
||||
</div>
|
||||
})}
|
||||
{!docListByDir.length && <div className='mb20 pl40 font-15'>暂无数据~</div>}
|
||||
</div>
|
||||
{total > 4 && <div className='align'><Link to={`/zone/uos/news/${activeDirId}`} onClick={()=>{window.scrollTo(0,450)}} className="color-blue font-15">查看更多<i className='iconfont icon-jiantou1 ml10 font-12'></i></Link></div>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
// 重置当前行
|
||||
currentRow = [];
|
||||
}
|
||||
});
|
||||
return rendered;
|
||||
};
|
||||
|
||||
return <div className='news_1_bg'>
|
||||
<div className='news_1 width1200 pt50 pb60'>
|
||||
<p className='font-bd font-30 mb15 align task-hide'>{homepageCmsTitle}</p>
|
||||
<p className='font-16 align color212 mb50'>{subTitle}</p>
|
||||
{
|
||||
showNew.id && <div className="news-show">
|
||||
<div className="news-show-left">
|
||||
<p className="news-title"><img src={ uosIcon } alt="" />{ showNew.name }</p>
|
||||
<p className="news-content">{ showNew.summary }</p>
|
||||
</div>
|
||||
<img className="news-img" src={ showNew.headImg } alt="" />
|
||||
</div>
|
||||
}
|
||||
<div className='df'>
|
||||
{/* 第一个顺序栏目 */}
|
||||
{firstDir && <div className='firstDir clearfix'>
|
||||
<p className='font-16 task-hide'>
|
||||
<Link style={{color: 'white'}} to={`/zone/uos/news/${firstDir.id}`} onClick={()=>{window.scrollTo(0,450)}}>{firstDir.name}</Link>
|
||||
<Link style={{color: 'white'}} className='fr font-15' to={`/zone/uos/news/${firstDir.id}`} onClick={()=>{window.scrollTo(0,450)}}>更多<Icon type="arrow-right" className="ml5"/></Link>
|
||||
</p>
|
||||
<div style={{fontFamily:"FangSong", height: 200}} className='font-24 ml85 mr80 flexCenter font-bd'>{firstDirIntro}</div>
|
||||
{docListByFirstDir[0] && <div className='pt10 pb10 pl20 docByFirstDir task-hide'>
|
||||
<Badge color="white" className='mr10'/>
|
||||
<Link to={`/zone/${key}/newdetail/${docListByFirstDir[0].id}`} className="font-15" style={{color: 'white'}}>{docListByFirstDir[0].name}</Link>
|
||||
</div>}
|
||||
</div>}
|
||||
{/* 第二个顺序栏目 */}
|
||||
{secondDir && <div className='secondDir flex1 ml30'>
|
||||
<div className='flexCenter pt15 pb15' style={{backgroundColor: '#F5F5F5'}}>
|
||||
<div className='img-box ml20 mr20'>
|
||||
<img src={dirpng}/>
|
||||
</div>
|
||||
<div>
|
||||
<p className='font-17 font-bd task-hide'>
|
||||
<Link to={`/zone/uos/news/${secondDir.id}`} onClick={()=>{window.scrollTo(0,450)}}>{secondDir.name}</Link>
|
||||
</p>
|
||||
<p className='color627'>{secondDirIntro}</p>
|
||||
</div>
|
||||
</div>
|
||||
<Row className='docBySecondDir pl25 pr30 pt10 pb30 mr0' type="flex" style={{alignContent: "flex-start", marginLeft: 0}} gutter={16}>
|
||||
{docListBySecondDir.map(item=>{
|
||||
return <Col span={12} className='mt15 task-hide pr15 font-15'>
|
||||
<Link to={`/zone/${key}/newdetail/${item.id}`}>
|
||||
<Badge color="#466AFF" className='mr10'/>
|
||||
{item.name}
|
||||
</Link>
|
||||
</Col>
|
||||
})}
|
||||
{docListBySecondDir && !docListBySecondDir.length && <div style={{margin: '0 auto', maxHeight: '230px'}}><Nodata small _html="暂无数据"/></div>}
|
||||
</Row>
|
||||
</div>}
|
||||
</div>
|
||||
{
|
||||
// 新闻动态
|
||||
newsList && newsList.length >= 0 &&
|
||||
<div className="zone_news zone_news_ccf">
|
||||
<div className="boxmain" style={{ display: "flex" }}>
|
||||
<div className="zone_new_first">
|
||||
<Slider {...setting}>
|
||||
{
|
||||
newsList && newsList.length > 0 ?
|
||||
newsList.map((i, k) => {
|
||||
return (
|
||||
<div className="regform" key={k}>
|
||||
<div className="newsBannerBox">
|
||||
<img src={i.headImg || img1} alt="" className='newsImg' onClick={()=>{window.location.href=`/zone/${deptId}/newdetail/${i.id}`}} />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
:
|
||||
""
|
||||
}
|
||||
</Slider>
|
||||
</div>
|
||||
<ul className={`zone_new_three_ccf ${newsList.length < 4 ? "flexStart" : "spaceeTween"}`}>
|
||||
{
|
||||
newsList.map((i, k) => {
|
||||
return (
|
||||
<li key={k} style={{boxShadow:"0px 0px 20px rgba(35, 54, 185, 0.06)",padding:"18px 20px 18px"}}>
|
||||
<Link className="zone_n_title" to={`/zone/${deptId}/newdetail/${i.id}`} style={{color:k===tag?"#466aff":"",lineHeight:"24px"}} >{i.name}</Link>
|
||||
<p className="zone_n_value df" style={{marginTop:"15px"}}>
|
||||
<span className="font-15" style={{ color: "#8d95a3" }}>
|
||||
<i className="iconfont icon-shijianicon mr3 font-14" />
|
||||
{i.publishTime}
|
||||
</span>
|
||||
<p className="font-15 flexCenter zone_btn" style={{ color: '#8d95a3',marginLeft:"auto" }} key={k} >
|
||||
<i className="iconfont icon-liulan font-15 lg ml7 mr5 lh26 icontianjiadaohangcolors" style={{ color: "#8d95a3" }} ></i>{i.visits}
|
||||
</p>
|
||||
</p>
|
||||
</li>
|
||||
)
|
||||
})
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div className="news-more">
|
||||
<Link to={`/zone/${key}/news`} >查看更多<img src={guideArrow} alt="" width="14px" className="ml3"/></Link>
|
||||
<Link to={`/zone/${key}/news`} >查看更多<i className="iconfont icon-jiantou2 font-12 ml3"/></Link>
|
||||
</div>
|
||||
{dirs && !!dirs.length && <div className='df wrap backWhite pt30 pb15 pl10 pr10'>
|
||||
{renderItems()}
|
||||
</div>}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,13 +33,17 @@ function TypeCarousel({pageSize=4, list=[], typeId, onClick}) {
|
|||
3: "icon-xingnengjizhunyupingce",
|
||||
4: "icon-renwutiaoduguanli"
|
||||
}
|
||||
return <div key={i} className={`proTypeBox df baseline ml25 mr25 pointer ${typeId === item.id && "active"}`} onClick={() => { onClick(item.id) }}>
|
||||
return <div key={i} className={`proTypeBox df baseline pointer ${typeId === item.id && "active"}`} onClick={() => { onClick(item.id) }}>
|
||||
{/* 项目 */}
|
||||
{/* <span className={`p_1_icon icon${i} mr5`}></span> */}
|
||||
<i className={`iconfont ${iconName[item.name] || iconName[i+1]} mr10 font-15`}></i>
|
||||
<i className={`iconfont ${iconName[item.name] || iconName[(i%4)+1]} mr10 font-15`}></i>
|
||||
<span className='font-16 font-bd task-hide' title={item.name}>{item.name}</span>
|
||||
</div>
|
||||
})}
|
||||
<a className={`proTypeBox df baseline pointer`} href={`${window.location.pathname}/projects`}>
|
||||
<i className='iconfont icon-erweima1 mr10 font-15'></i>
|
||||
<span className='font-16 font-bd task-hide'>更多</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
})}
|
||||
|
|
@ -129,30 +133,30 @@ function Project({ data }) {
|
|||
return <div className={`${className} ${className === "second_detail" && index <3 && index<length-1 && 'pb30'} ${index === length && 'noBor'}`} key={i.id} onClick={() => window.open(i.projectURL)}>
|
||||
<div className='clearfix'>
|
||||
<span className='font-bd font-16 pointer'>{i.projectProperties && i.projectProperties.name}</span>
|
||||
{className === "online_detail" && <img src={require(`../image/top${index+1}.png`)} alt='' width="60px" className='fr'/>}
|
||||
{className === "online_detail" && <img src={require(`../image/top${index+1}.png`)} alt='' width="60px" className='fr mt5'/>}
|
||||
</div>
|
||||
<div className="task-hide-2 mt5 color5d6 mb12">
|
||||
{i.projectProperties.description || "暂无描述"}
|
||||
</div>
|
||||
<div style={{ minHeight: 46 }}>
|
||||
<ul className="pd_tag_NSCC pb15 df wrap">
|
||||
{i.projectProperties.language && <li className='font-13 mr10 mt5'>{i.projectProperties.language}</li>}
|
||||
{i.projectProperties.language && <li className='font-13 mt5'>{i.projectProperties.language}</li>}
|
||||
{
|
||||
i.projectProperties && i.projectProperties.topics &&
|
||||
i.projectProperties.topics.split(",").map(t => {
|
||||
return (
|
||||
<li className='font-13 mr10 mt5'>{t}</li>
|
||||
<li className='font-13 mt5'>{t}</li>
|
||||
)
|
||||
})
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
<p className='flexCenter between'>
|
||||
<p className='df between'>
|
||||
<div className='font-15 font-bd'>
|
||||
<span className='color5d6 mr5 font-14 font-n'>开发者</span>{contributorsCount || 0}
|
||||
<Divider type="vertical" style={{ margin: '0 15px' }} />
|
||||
<span className='color5d6 mr5 font-14 font-n'>历史提交总量</span>{commitCount || 0}
|
||||
<Divider type="vertical" style={{ margin: '0 15px' }} />
|
||||
{!!scoreChange ? <br/> : <Divider type="vertical" style={{ margin: '0 15px' }} />}
|
||||
<span className='color5d6 mr5 font-14 font-n'>活跃度</span>{lastWeekScore || 0}
|
||||
</div>
|
||||
{!!scoreChange && <span className='font-18 font-bd fr'>
|
||||
|
|
@ -167,7 +171,7 @@ function Project({ data }) {
|
|||
<div className='project_1 width1200 pt50 pb60'>
|
||||
<p className='font-bd font-30 mb50 align task-hide'>{homepageProjectTitle}</p>
|
||||
<div className='project_list_NSCC'>
|
||||
<TypeCarousel pageSize={5} list={typeList} typeId={typeId} onClick={(id)=>{setTypeId(id); setPage(1)}}/>
|
||||
<TypeCarousel pageSize={10} list={typeList} typeId={typeId} onClick={(id)=>{setTypeId(id); setPage(1)}}/>
|
||||
<Spin spinning={loading}>
|
||||
<div className='df gap20'>
|
||||
{lists.slice(0, 3).map((i, index)=>{
|
||||
|
|
|
|||
|
|
@ -983,6 +983,8 @@
|
|||
border-radius:4px;
|
||||
color:#466aff;
|
||||
background-color:#E5EAFF;
|
||||
border: 1px solid rgba(255, 255, 255, 0);
|
||||
margin-right: 8px;
|
||||
&:nth-of-type(3n+2){
|
||||
color:#1c9907;
|
||||
background-color:#EBF5ED;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ function HeaderPageUos(props){
|
|||
<div className="uos_homepage_box">
|
||||
<Introduction data={data}/>
|
||||
<Project data={data} subTitle="探索前沿泛在项目,引领跨领域创新实践"/>
|
||||
<News data={data} subTitle="掌握领域动态,紧跟专项研究,洞察泛在操作系统最新进展" firstDirIntro="CCF开源发展委员会“泛在操作系统开源生态”工作组" secondDirIntro="拥抱技术,与开发者携手预见未来!"/>
|
||||
<News data={data} subTitle="掌握领域动态,紧跟专项研究,洞察泛在操作系统最新进展" match={props.match} firstDirIntro="CCF开源发展委员会“泛在操作系统开源生态”工作组" secondDirIntro="拥抱技术,与开发者携手预见未来!"/>
|
||||
<SpecialProjects data={data} subTitle="掌握领域动态,紧跟专项研究,洞察泛在操作系统最新进展"/>
|
||||
<Source data={data} subTitle="集萃一站式文献与应用,助力构建高效、安全的泛在操作系统生态"/>
|
||||
<Member data={data}/>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
import React from 'react';
|
||||
|
||||
function Lessons({src="https://gitlink.educoder.net/"}){
|
||||
|
||||
return(
|
||||
<div className='lessonsdiv' style={{height:"2539px"}}>
|
||||
<iframe
|
||||
id={"lessons"}
|
||||
width="100%"
|
||||
height={"100%"}
|
||||
src={src}
|
||||
frameBorder="0"
|
||||
scrolling="no"
|
||||
></iframe>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default Lessons;
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
|
|
@ -36,6 +36,10 @@ const Apply = Loadable({
|
|||
loader: () => import("./Pages/apply"),
|
||||
loading: Loading,
|
||||
});
|
||||
const Lessons = Loadable({
|
||||
loader: () => import("./Pages/lessons"),
|
||||
loading: Loading,
|
||||
});
|
||||
const Source = Loadable({
|
||||
loader: () => import("./Pages/source"),
|
||||
loading: Loading,
|
||||
|
|
@ -254,6 +258,12 @@ function Index(props){
|
|||
<DatasetFileList {...props} {...p} id={id} temp={ temp } role={role} sectionResourceTitle={data && data.sectionResourceTitle}/>
|
||||
)}
|
||||
></Route>
|
||||
<Route
|
||||
path="/zone/:deptId/lessons"
|
||||
render={(p) => (
|
||||
<Lessons {...props} {...p} id={id} temp={ temp } data={data}/>
|
||||
)}
|
||||
></Route>
|
||||
<Route
|
||||
path="/zone/:deptId/dataset"
|
||||
render={(p) => (
|
||||
|
|
@ -303,7 +313,7 @@ function Index(props){
|
|||
deptId === "JCC" ? <HomePageByJCC {...props} {...p} data={data} id={id}/>:
|
||||
deptId === "uos" ? <HomePageByUos {...props} {...p} data={data} id={id}/>:
|
||||
deptId==="xjykyzx" ? <HeaderPageKyzx {...props} {...p} data={data} id={id} temp={ temp } />:
|
||||
deptId==="NSCC" ? <HomePageByNSCC {...props} {...p} data={data} id={id} temp={ temp } />:
|
||||
deptId.toLocaleUpperCase()==="NSCC" ? <HomePageByNSCC {...props} {...p} data={data} id={id} temp={ temp } />:
|
||||
temp === tempEnum.zone ? <HeaderPage {...props} {...p} data={data} id={id} temp={ temp }/>:
|
||||
<HeaderPageZone1 {...props} {...p} data={data} id={id} temp={ temp }/>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -723,7 +723,7 @@ function CoderDepot(props){
|
|||
/>
|
||||
</React.Fragment>
|
||||
}
|
||||
{__CLIENT__ && projectDetail && projectDetail.project_id && !projectDetail.private && <ProjectCompass owner={owner} projectsId={projectsId} />}
|
||||
{/* {__CLIENT__ && projectDetail && projectDetail.project_id && !projectDetail.private && <ProjectCompass owner={owner} projectsId={projectsId} />} */}
|
||||
{/* 贡献者 */}
|
||||
{mirror_status ===0 && <Contributors owner={owner} projectsId={projectsId} /> }
|
||||
{/* 项目画像: 导入/fork项目不展示, open_portrait后台配置是否开启仓库 */}
|
||||
|
|
|
|||
|
|
@ -46,20 +46,20 @@ function ServerIndex(props){
|
|||
return(
|
||||
<div className="panels">
|
||||
<Switch {...props}>
|
||||
<Route path="/:owner/:projectsId/service/measurement/:type"
|
||||
{/* <Route path="/:owner/:projectsId/service/measurement/:type"
|
||||
render={
|
||||
(p) => (<MeasurementDetail {...props} {...p}/>)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/:owner/:projectsId/service/reposyncer"
|
||||
render={
|
||||
() => (<Reposyncer {...props}/>)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/:owner/:projectsId/service/measurement"
|
||||
render={
|
||||
(p) => (<Measurement {...props} {...p}/>)
|
||||
}
|
||||
></Route> */}
|
||||
<Route path="/:owner/:projectsId/service/reposyncer"
|
||||
render={
|
||||
() => (<Reposyncer {...props}/>)
|
||||
}
|
||||
></Route>
|
||||
<Route path="/:owner/:projectsId/service/codeanalysis"
|
||||
render={
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ function Main(props){
|
|||
<Link to={`/${owner}/${projectsId}/service/pages`} className="btnhover">查看详情</Link>
|
||||
</span>
|
||||
</li>}
|
||||
{
|
||||
{/* {
|
||||
!privateStatus &&
|
||||
<li>
|
||||
<span className="servername">
|
||||
|
|
@ -92,7 +92,7 @@ function Main(props){
|
|||
<Link to={`/${owner}/${projectsId}/service/measurement`} className="btnhover">查看详情</Link>
|
||||
</span>
|
||||
</li>
|
||||
}
|
||||
} */}
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 24 KiB |
|
|
@ -8,9 +8,6 @@
|
|||
/* 影响notification */
|
||||
/* z-index: 20000; */
|
||||
}
|
||||
#DialogID .dialogBox {
|
||||
width: 400px;
|
||||
}
|
||||
.MuiPaper-elevation24-45{
|
||||
box-shadow:none !important;
|
||||
}
|
||||
|
|
@ -24,7 +21,7 @@
|
|||
top: -64px !important;
|
||||
}
|
||||
#log_reg_content{
|
||||
width:405px !important;
|
||||
width:445px !important;
|
||||
border-radius:6px;
|
||||
box-shadow:4px 8px 12px rgba(76,76,76,0.3);
|
||||
}
|
||||
|
|
@ -39,7 +36,7 @@
|
|||
margin-left:10px;
|
||||
margin-right:10px;
|
||||
}
|
||||
#DialogID div {
|
||||
#DialogID>div {
|
||||
overflow-y:visible !important;
|
||||
box-shadow:none !important;
|
||||
}
|
||||
|
|
@ -158,4 +155,4 @@
|
|||
|
||||
.MuiModal-root-15 {
|
||||
z-index: 10001 !important;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +1,13 @@
|
|||
import React, { Component } from 'react';
|
||||
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
import { notification , Tooltip } from 'antd';
|
||||
|
||||
import { notification } from 'antd';
|
||||
import axios from 'axios';
|
||||
import educoderLogo from './educoder.png';
|
||||
import qqlogo from './qq@2x.png';
|
||||
import WeChatlogo from './WeChat@2x.png';
|
||||
import giteelogo from './gitee.png';
|
||||
import githublogo from './github.png';
|
||||
import cookie from 'react-cookies';
|
||||
import './LoginDialog.css';
|
||||
import { broadcastChannelPostMessage } from 'educoder'
|
||||
import Notcompletedysl from "../user/Notcompletedysl";
|
||||
import { Encrypt } from '../../common/Env';
|
||||
import OtherLogin from '../loginRegister/component/otherLogin';
|
||||
|
||||
const $ = window.$;
|
||||
var wait = 60;
|
||||
|
|
@ -416,20 +410,12 @@ class LoginDialog extends Component {
|
|||
MyEduCoderModals: false
|
||||
})
|
||||
};
|
||||
setMyEduCoderModals = () => {
|
||||
this.setState({
|
||||
MyEduCoderModals: true
|
||||
})
|
||||
};
|
||||
onKeydowns = (e) => {
|
||||
let { disabled } = this.state;
|
||||
if (disabled === false && e.keyCode === 13) {
|
||||
this.loginEDU()
|
||||
}
|
||||
};
|
||||
getloginurl = (url) => {
|
||||
window.location.href = url;
|
||||
};
|
||||
openNotifications = (btn) => {
|
||||
// type 1 成功提示绿色 2提醒颜色黄色 3错误提示红色
|
||||
notification.open({
|
||||
|
|
@ -441,28 +427,6 @@ class LoginDialog extends Component {
|
|||
},
|
||||
});
|
||||
}
|
||||
openqqlogin = () => {
|
||||
this.setState({
|
||||
qqlogin: true
|
||||
})
|
||||
window.location.href = `https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginqq&state=null,${window.location.host}&response_type=code`
|
||||
}
|
||||
|
||||
openphoneqqlogin = () => {
|
||||
window.open(
|
||||
`https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginqq&state=null,${window.location.host}&response_type=code`
|
||||
)
|
||||
}
|
||||
|
||||
getTContainer = () => {
|
||||
return document.body;
|
||||
}
|
||||
hideweixinlogin = () => {
|
||||
this.setState({
|
||||
weixinlogin: false,
|
||||
qqlogin: false
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
|
|
@ -487,7 +451,7 @@ class LoginDialog extends Component {
|
|||
{
|
||||
`
|
||||
#DialogID .dialogBox {
|
||||
width: 405px !important;
|
||||
width: 445px !important;
|
||||
}
|
||||
.dialogBox {
|
||||
height: 290px !important;
|
||||
|
|
@ -575,25 +539,7 @@ class LoginDialog extends Component {
|
|||
<a href="/register" className="color-grey-9">注册</a>
|
||||
</span>
|
||||
</p>
|
||||
{
|
||||
settings && settings.third_party_new && settings.third_party_new.length > 0 ?
|
||||
<p className="clearfix mt20">
|
||||
<span className={"startlogin"}>———————— 快速登录 ————————</span>
|
||||
<div className={"mt10"}>
|
||||
{settings.third_party_new.map((item,key)=>{
|
||||
return(
|
||||
<a href={`${item.url}`} className="ml12 mr12">
|
||||
<Tooltip title={`使用${item.name === "qq" ? "QQ":item.name === "wechat" ? "微信" : item.name}账号登录`}>
|
||||
<img src={item.name === "educoder" ? educoderLogo : item.name === "qq" ? qqlogo : item.name === "wechat" ? WeChatlogo : item.name === "gitee" ? giteelogo : item.name === "github" ? githublogo : ""} width="42px" alt={`${item.name}登录`} />
|
||||
</Tooltip>
|
||||
</a>
|
||||
)
|
||||
})
|
||||
}
|
||||
</div>
|
||||
</p>
|
||||
:""
|
||||
}
|
||||
<OtherLogin />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 143 B |
|
|
@ -226,7 +226,32 @@
|
|||
border-bottom: 2px solid;
|
||||
}
|
||||
}
|
||||
|
||||
.dfpanel{
|
||||
height: 50px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
img{
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
.thirdPanel{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
min-width: 160px;
|
||||
max-width:230px;
|
||||
a{
|
||||
margin:5px 12px;
|
||||
img{
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.moreIcon,.theTop{
|
||||
z-index: 11111!important;
|
||||
}
|
||||
/*当页面宽度大于1000px*/
|
||||
@media screen and (min-width:1000px) {
|
||||
.right_cont{width: 540px; }
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
import React,{useState ,useEffect} from 'react';
|
||||
import { Divider, Tooltip } from 'antd';
|
||||
import { Divider, Tooltip , Popover } from 'antd';
|
||||
import educoderLogo from '../../login/educoder.png';
|
||||
import qqlogo from '../../login/qq@2x.png';
|
||||
import WeChatlogo from '../../login/WeChat@2x.png';
|
||||
import giteelogo from '../../login/gitee.png';
|
||||
import githublogo from '../../login/github.png';
|
||||
import CCFlogo from '../../login/CCF.png';
|
||||
import OpenI from '../../login/OpenI.svg';
|
||||
import defaultlog from '../../login/default.png';
|
||||
import "../LoginRegisterPage.scss"
|
||||
|
||||
function OtherLogin(){
|
||||
const [setting, setSetting] = useState(undefined);
|
||||
|
|
@ -14,22 +18,61 @@ function OtherLogin(){
|
|||
setSetting(JSON.parse(localStorage.getItem("chromesetting")));
|
||||
},[])
|
||||
|
||||
function renderLogo(name){
|
||||
if(!name) return;
|
||||
switch(name.toLowerCase()){
|
||||
case 'educoder':
|
||||
return educoderLogo;
|
||||
case 'qq':
|
||||
return qqlogo;
|
||||
case 'wechat':
|
||||
return WeChatlogo;
|
||||
case 'gitee':
|
||||
return giteelogo;
|
||||
case 'github':
|
||||
return githublogo;
|
||||
case 'ccf':
|
||||
return CCFlogo;
|
||||
case 'openi':
|
||||
return OpenI;
|
||||
default:
|
||||
return defaultlog;
|
||||
}
|
||||
}
|
||||
return(
|
||||
setting && setting.third_party_new && setting.third_party_new.length > 0 ?
|
||||
<div className="quick_login">
|
||||
<Divider className="quick_login_Divider">
|
||||
<span className='font-13 startlogin'>快速登录</span>
|
||||
</Divider>
|
||||
{setting.third_party_new.map((item,key)=>{
|
||||
return(
|
||||
<a href={`${item.url}`} className="ml15 mr15">
|
||||
<Tooltip title={`使用${item.name === "qq" ? "QQ":item.name === "wechat" ? "微信" : item.name}账号登录`}>
|
||||
<img src={item.name === "educoder" ? educoderLogo : item.name === "qq" ? qqlogo : item.name === "wechat" ? WeChatlogo : item.name === "gitee" ? giteelogo : item.name === "github" ? githublogo : ""} width="46px" alt={`${item.name}登录`}/>
|
||||
</Tooltip>
|
||||
</a>
|
||||
)
|
||||
})
|
||||
}
|
||||
<div className='dfpanel'>
|
||||
{setting.third_party_new.map((item,key)=>{
|
||||
return(
|
||||
key < 4 && <a href={`${item.url}`} className="ml15 mr15">
|
||||
<Tooltip overlayClassName='theTop' title={`使用${item.name === "qq" ? "QQ":item.name === "wechat" ? "微信" : item.name}账号登录`}>
|
||||
<img src={renderLogo(item.name)} width={item.name==="ccf"?"50px":"40px"} alt={`${item.name}登录`}/>
|
||||
</Tooltip>
|
||||
</a>
|
||||
)
|
||||
})
|
||||
}
|
||||
{
|
||||
setting.third_party_new.length > 4 &&
|
||||
<Popover placement="left" content={<div className='thirdPanel'>
|
||||
{
|
||||
setting.third_party_new.map((i,k)=>{
|
||||
return k>=4 &&<a href={`${i.url}` }>
|
||||
<Tooltip overlayClassName='theTop' title={`使用${i.name === "qq" ? "QQ":i.name === "wechat" ? "微信" : i.name}账号登录`}>
|
||||
<img src={renderLogo(i.name)} height={35}/>
|
||||
</Tooltip>
|
||||
</a>
|
||||
})
|
||||
}
|
||||
</div>} trigger="hover" overlayClassName='theTop' getPopupContainer={trigger=>trigger.parentNode}>
|
||||
<i className='iconfont icon-kongbai font-40 ml12 mr12' style={{color:"#8daec6"}}/>
|
||||
</Popover>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
:""
|
||||
)
|
||||
|
|
|
|||