diff --git a/src/forge/Information/Pages/newsList.jsx b/src/forge/Information/Pages/newsList.jsx
index e235534ec..bd25c8291 100644
--- a/src/forge/Information/Pages/newsList.jsx
+++ b/src/forge/Information/Pages/newsList.jsx
@@ -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(()=>{
@@ -119,7 +121,7 @@ function NewsList(props){
mainList && mainList.length>0 &&
mainList.map((i,k)=>{
return(
-
{props.history.push(`/zone/${deptId}/newdetail/${i.id}`)}} key={k}>
+
{props.history.push(`/${temp}/${deptId}/newdetail/${i.id}`)}} key={k}>
{
i.headImg ?

@@ -127,7 +129,7 @@ function NewsList(props){
}
-
{i.name}
+
{i.name}
{i.summary}
@@ -143,7 +145,7 @@ function NewsList(props){
{
mainList && mainList.length === 0 &&
-

+
暂无数据~
}
diff --git a/src/forge/Information/Pages/projectSource.jsx b/src/forge/Information/Pages/projectSource.jsx
index b093147e8..71591cd77 100644
--- a/src/forge/Information/Pages/projectSource.jsx
+++ b/src/forge/Information/Pages/projectSource.jsx
@@ -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,{
- pageNum:page,
- name:searchName,
- pageSize,
- projectTypeId:typeId===0?undefined:typeId
+ 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 = (
diff --git a/src/forge/Information/Pages/zoneVIP.jsx b/src/forge/Information/Pages/zoneVIP.jsx
index 0eee4127d..b3d522d66 100644
--- a/src/forge/Information/Pages/zoneVIP.jsx
+++ b/src/forge/Information/Pages/zoneVIP.jsx
@@ -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(
-
-
专区会员
-
社区根据您的贡献与扮演角色将用户划分成为不同的人员团队,并构建会员成长体系。您有兴趣成为会员,尽情发挥创意与智慧,与专区共同成长吗?
+
+
{ tempConfig[temp].member }
+
{ tempConfig[temp].vipDesc }
+ { memberStatus === memberStatusEnum.notMember &&
}
+ { memberStatus === memberStatusEnum.applying &&
您的申请已提交,请耐心等待管理员审核!
}
+
setApplyVisible(!applyVisible)} current_user={props.current_user}/>
+
{
@@ -43,7 +91,12 @@ function ZoneVIP(props){

-
{i.typeName}
+
+
+ {i.typeName}
+
+ { temp === 'zone1' &&
{i.typeName}
}
+
{i.typeIntroduction}
{
@@ -52,11 +105,14 @@ function ZoneVIP(props){
{
i.zoneMemberList.map((j,key)=>{
return(
+
-
-
-
{j.name}{j.memberLevel && {j.memberLevel} }
-
{j.introduction}
+
+

+
+
{j.name}{j.memberLevel && {j.memberLevel} }
+
{j.introduction}
+
)
@@ -64,7 +120,9 @@ function ZoneVIP(props){
}
:
-
+ (
+ temp === 'zone1' ?
:
+ )
}
)
diff --git a/src/forge/Information/api.js b/src/forge/Information/api.js
index 21f778128..e11159e88 100644
--- a/src/forge/Information/api.js
+++ b/src/forge/Information/api.js
@@ -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
});
}
@@ -80,4 +81,21 @@ export function getVIPLists(id){
url:`/zone/open/${id}/member/overviewList`,
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
+ });
}
\ No newline at end of file
diff --git a/src/forge/Information/fetch.js b/src/forge/Information/fetch.js
index 29cc15d28..d42bb4a05 100644
--- a/src/forge/Information/fetch.js
+++ b/src/forge/Information/fetch.js
@@ -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;
\ No newline at end of file
diff --git a/src/forge/Information/img/1.png b/src/forge/Information/img/1.png
new file mode 100644
index 000000000..49e865855
Binary files /dev/null and b/src/forge/Information/img/1.png differ
diff --git a/src/forge/Information/img/cbg.png b/src/forge/Information/img/cbg.png
new file mode 100644
index 000000000..2f05655a1
Binary files /dev/null and b/src/forge/Information/img/cbg.png differ
diff --git a/src/forge/Information/img/cbg2.png b/src/forge/Information/img/cbg2.png
new file mode 100644
index 000000000..2f7a42562
Binary files /dev/null and b/src/forge/Information/img/cbg2.png differ
diff --git a/src/forge/Information/img/communicateBg.png b/src/forge/Information/img/communicateBg.png
new file mode 100644
index 000000000..2f9c7ff87
Binary files /dev/null and b/src/forge/Information/img/communicateBg.png differ
diff --git a/src/forge/Information/img/growBg.png b/src/forge/Information/img/growBg.png
new file mode 100644
index 000000000..69c4506e1
Binary files /dev/null and b/src/forge/Information/img/growBg.png differ
diff --git a/src/forge/Information/img/guideArrow1.png b/src/forge/Information/img/guideArrow1.png
new file mode 100644
index 000000000..18549a1c3
Binary files /dev/null and b/src/forge/Information/img/guideArrow1.png differ
diff --git a/src/forge/Information/img/intro1.png b/src/forge/Information/img/intro1.png
new file mode 100644
index 000000000..0c7978978
Binary files /dev/null and b/src/forge/Information/img/intro1.png differ
diff --git a/src/forge/Information/img/intro2.png b/src/forge/Information/img/intro2.png
new file mode 100644
index 000000000..5eb763589
Binary files /dev/null and b/src/forge/Information/img/intro2.png differ
diff --git a/src/forge/Information/img/intro3.png b/src/forge/Information/img/intro3.png
new file mode 100644
index 000000000..c641ecb8b
Binary files /dev/null and b/src/forge/Information/img/intro3.png differ
diff --git a/src/forge/Information/img/intro4.png b/src/forge/Information/img/intro4.png
new file mode 100644
index 000000000..1e9832b9f
Binary files /dev/null and b/src/forge/Information/img/intro4.png differ
diff --git a/src/forge/Information/img/newsBg.png b/src/forge/Information/img/newsBg.png
new file mode 100644
index 000000000..127cf4df9
Binary files /dev/null and b/src/forge/Information/img/newsBg.png differ
diff --git a/src/forge/Information/img/nodata.png b/src/forge/Information/img/nodata.png
new file mode 100644
index 000000000..cad2a2d34
Binary files /dev/null and b/src/forge/Information/img/nodata.png differ
diff --git a/src/forge/Information/img/projectBg.png b/src/forge/Information/img/projectBg.png
new file mode 100644
index 000000000..4648e2547
Binary files /dev/null and b/src/forge/Information/img/projectBg.png differ
diff --git a/src/forge/Information/img/projectLeft.png b/src/forge/Information/img/projectLeft.png
new file mode 100644
index 000000000..c0568bcaf
Binary files /dev/null and b/src/forge/Information/img/projectLeft.png differ
diff --git a/src/forge/Information/img/projectRight.png b/src/forge/Information/img/projectRight.png
new file mode 100644
index 000000000..4f5eed3a3
Binary files /dev/null and b/src/forge/Information/img/projectRight.png differ
diff --git a/src/forge/Information/img/ra.png b/src/forge/Information/img/ra.png
new file mode 100644
index 000000000..6015c61c2
Binary files /dev/null and b/src/forge/Information/img/ra.png differ
diff --git a/src/forge/Information/img/title.png b/src/forge/Information/img/title.png
new file mode 100644
index 000000000..ceda46d25
Binary files /dev/null and b/src/forge/Information/img/title.png differ
diff --git a/src/forge/Information/img/vipListBg.png b/src/forge/Information/img/vipListBg.png
new file mode 100644
index 000000000..839769346
Binary files /dev/null and b/src/forge/Information/img/vipListBg.png differ
diff --git a/src/forge/Information/img/vipTitleBg.png b/src/forge/Information/img/vipTitleBg.png
new file mode 100644
index 000000000..b3cfbaf4b
Binary files /dev/null and b/src/forge/Information/img/vipTitleBg.png differ
diff --git a/src/forge/Information/img/vision0.png b/src/forge/Information/img/vision0.png
new file mode 100644
index 000000000..7fc5da0d6
Binary files /dev/null and b/src/forge/Information/img/vision0.png differ
diff --git a/src/forge/Information/img/vision1.png b/src/forge/Information/img/vision1.png
new file mode 100644
index 000000000..9061cd950
Binary files /dev/null and b/src/forge/Information/img/vision1.png differ
diff --git a/src/forge/Information/img/vision2.png b/src/forge/Information/img/vision2.png
new file mode 100644
index 000000000..e46b3c126
Binary files /dev/null and b/src/forge/Information/img/vision2.png differ
diff --git a/src/forge/Information/img/vision3.png b/src/forge/Information/img/vision3.png
new file mode 100644
index 000000000..4f0d0ee4f
Binary files /dev/null and b/src/forge/Information/img/vision3.png differ
diff --git a/src/forge/Information/img/visionBack.png b/src/forge/Information/img/visionBack.png
new file mode 100644
index 000000000..f1f4be650
Binary files /dev/null and b/src/forge/Information/img/visionBack.png differ
diff --git a/src/forge/Information/img/visionBackActive.png b/src/forge/Information/img/visionBackActive.png
new file mode 100644
index 000000000..9dad4ea10
Binary files /dev/null and b/src/forge/Information/img/visionBackActive.png differ
diff --git a/src/forge/Information/img/zone1Menu1.png b/src/forge/Information/img/zone1Menu1.png
new file mode 100644
index 000000000..623ebbedb
Binary files /dev/null and b/src/forge/Information/img/zone1Menu1.png differ
diff --git a/src/forge/Information/img/zone1Menu2.png b/src/forge/Information/img/zone1Menu2.png
new file mode 100644
index 000000000..112fa05a0
Binary files /dev/null and b/src/forge/Information/img/zone1Menu2.png differ
diff --git a/src/forge/Information/img/zone1Menu4.png b/src/forge/Information/img/zone1Menu4.png
new file mode 100644
index 000000000..851a1da99
Binary files /dev/null and b/src/forge/Information/img/zone1Menu4.png differ
diff --git a/src/forge/Information/img/zone1Menu6.png b/src/forge/Information/img/zone1Menu6.png
new file mode 100644
index 000000000..824e638da
Binary files /dev/null and b/src/forge/Information/img/zone1Menu6.png differ
diff --git a/src/forge/Information/img/zone1Menu7.png b/src/forge/Information/img/zone1Menu7.png
new file mode 100644
index 000000000..7214b3c68
Binary files /dev/null and b/src/forge/Information/img/zone1Menu7.png differ
diff --git a/src/forge/Information/img/menu1.png b/src/forge/Information/img/zoneMenu1.png
similarity index 100%
rename from src/forge/Information/img/menu1.png
rename to src/forge/Information/img/zoneMenu1.png
diff --git a/src/forge/Information/img/menu2.png b/src/forge/Information/img/zoneMenu2.png
similarity index 100%
rename from src/forge/Information/img/menu2.png
rename to src/forge/Information/img/zoneMenu2.png
diff --git a/src/forge/Information/img/menu4.png b/src/forge/Information/img/zoneMenu4.png
similarity index 100%
rename from src/forge/Information/img/menu4.png
rename to src/forge/Information/img/zoneMenu4.png
diff --git a/src/forge/Information/img/menu6.png b/src/forge/Information/img/zoneMenu6.png
similarity index 100%
rename from src/forge/Information/img/menu6.png
rename to src/forge/Information/img/zoneMenu6.png
diff --git a/src/forge/Information/img/menu7.png b/src/forge/Information/img/zoneMenu7.png
similarity index 100%
rename from src/forge/Information/img/menu7.png
rename to src/forge/Information/img/zoneMenu7.png
diff --git a/src/forge/Information/index.jsx b/src/forge/Information/index.jsx
index 1b61224be..056bc1f78 100644
--- a/src/forge/Information/index.jsx
+++ b/src/forge/Information/index.jsx
@@ -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){
(
)}
>
(
)}
>
(
)}
>
(
)}
>
(
)}
>
(
-
+ temp === 'zone' ? :
)}
>
diff --git a/src/forge/Information/index.scss b/src/forge/Information/index.scss
index 95176d674..18f83fcc4 100644
--- a/src/forge/Information/index.scss
+++ b/src/forge/Information/index.scss
@@ -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,51 +957,53 @@
margin-top: 15px;
padding-bottom: 10px;
.card_u_li{
- display: flex;
- padding:25px 0px;
- border-bottom: 1px dashed rgba(141, 149, 172,0.27);
- align-items: center;
- object-fit: cover;
- &:last-child{
+ &:last-child .card_u_wrap{
border-bottom: none;
}
- & > a >img{
- width: 100px;
- height: 100px;
- 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_wrap {
+ display: flex;
+ padding:25px 0px;
+ border-bottom: 1px dashed rgba(141, 149, 172,0.27);
+ align-items: center;
+ object-fit: cover;
+ & > a >img{
+ width: 100px;
+ height: 100px;
+ border-radius: 50%;
+ margin-right: 24px;
}
- .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{
- display: inline-block;
- height:26px;
- background-color:rgba(70, 106, 255, 0.13);
- border-radius:2px;
- min-width: 76px;
- text-align: center;
- line-height: 26px;
- color:#466aff;
+ .card_u_info{
+ .card_u_down{
+ color:#4c5876;
font-size:15px;
- margin-left: 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{
+ display: inline-block;
+ height:26px;
+ background-color:rgba(70, 106, 255, 0.13);
+ border-radius:2px;
+ min-width: 76px;
+ text-align: center;
+ line-height: 26px;
+ color:#466aff;
+ font-size:15px;
+ margin-left: 15px;
+ }
}
}
}
@@ -935,9 +1012,89 @@
}
}
}
-.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;
+ }
+ }
+ }
+ }
+ }
}
}
\ No newline at end of file
diff --git a/src/forge/Information/indexZone1.scss b/src/forge/Information/indexZone1.scss
new file mode 100644
index 000000000..456723ef8
--- /dev/null
+++ b/src/forge/Information/indexZone1.scss
@@ -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;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/forge/Information/tempInfo.js b/src/forge/Information/tempInfo.js
new file mode 100644
index 000000000..3ae2fe698
--- /dev/null
+++ b/src/forge/Information/tempInfo.js
@@ -0,0 +1,15 @@
+export const tempConfig = {
+ zone: {
+ mainTitle: '领域资讯',
+ hotTitle: '热门资讯',
+ member: '专区会员',
+ vipDesc: '社区根据您的贡献与扮演角色将用户划分成为不同的人员团队,并构建会员成长体系。您有兴趣成为会员,尽情发挥创意与智慧,与专区共同成长吗?',
+ },
+ zone1: {
+ mainTitle: '新闻资讯',
+ hotTitle: '热门新闻资讯',
+ member: '荣誉榜单',
+ vipDesc: '荣誉榜单记录用户在开源芯片社区的社区角与成长进度,欢迎广大用户参与到开源芯片项目,与社区共同成长!',
+ }
+}
+
diff --git a/src/forge/Information/theme.scss b/src/forge/Information/theme.scss
new file mode 100644
index 000000000..ecfc43a29
--- /dev/null
+++ b/src/forge/Information/theme.scss
@@ -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);
+}
\ No newline at end of file
diff --git a/src/forge/Nodata.js b/src/forge/Nodata.js
index ccc74ac54..8ca2253a1 100644
--- a/src/forge/Nodata.js
+++ b/src/forge/Nodata.js
@@ -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(
-

+
{_html}
diff --git a/src/forge/Team/Component/UploadImage.jsx b/src/forge/Team/Component/UploadImage.jsx
index 6b7ef8e68..d70d62388 100644
--- a/src/forge/Team/Component/UploadImage.jsx
+++ b/src/forge/Team/Component/UploadImage.jsx
@@ -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 ?
diff --git a/src/glcc/home/index.jsx b/src/glcc/home/index.jsx
index 22720eb2f..1e212ea75 100644
--- a/src/glcc/home/index.jsx
+++ b/src/glcc/home/index.jsx
@@ -159,7 +159,7 @@ export default (props) => {
OpenMMLab是深度学习时代最完整的计算机视觉开源算法体系。自开源以来,累计发布了超过20个算法库,有超过300个算法2300多个预训练模型。所有算法均具备风格统一、模型丰富、质量高、易复现等特点。在社区生态上,OpenMMLab一直秉持开放、认真、持续成长的原则,积极推动社区建设发展
-
+
}
diff --git a/src/glcc/index.jsx b/src/glcc/index.jsx
index 701c1021b..eabbd26b5 100644
--- a/src/glcc/index.jsx
+++ b/src/glcc/index.jsx
@@ -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) &&
(
-
+
)}
>}
{/* 项目/课题列表 */}
{!(round === 2 && !repoPublic) &&
(
-
+
)}
>}
@@ -250,7 +251,7 @@ const Glcc = (propsF) => {
{!(round === 2 && !repoPublic) &&
(
-
+
)}
>}
@@ -258,7 +259,7 @@ const Glcc = (propsF) => {
(
-
+
)}
>
diff --git a/src/glcc/openmmlab/index.jsx b/src/glcc/openmmlab/index.jsx
index 4945c030a..eba15b8a3 100644
--- a/src/glcc/openmmlab/index.jsx
+++ b/src/glcc/openmmlab/index.jsx
@@ -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) {
项目精选
-
+
-
+ {pathname.endsWith("/2022") &&
+
}
)
}
diff --git a/src/glcc/openmmlab/projectTab/index.jsx b/src/glcc/openmmlab/projectTab/index.jsx
index 9dfc1e1ef..dab774525 100644
--- a/src/glcc/openmmlab/projectTab/index.jsx
+++ b/src/glcc/openmmlab/projectTab/index.jsx
@@ -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 + ''} >
diff --git a/src/glcc/openmmlab/projectTab/index.scss b/src/glcc/openmmlab/projectTab/index.scss
index 0b8b64e10..624d1dab4 100644
--- a/src/glcc/openmmlab/projectTab/index.scss
+++ b/src/glcc/openmmlab/projectTab/index.scss
@@ -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') ;
diff --git a/src/glcc/openmmlab/projectTab/projectDetail.jsx b/src/glcc/openmmlab/projectTab/projectDetail.jsx
index fd7c0b1dc..48f8b65da 100644
--- a/src/glcc/openmmlab/projectTab/projectDetail.jsx
+++ b/src/glcc/openmmlab/projectTab/projectDetail.jsx
@@ -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
-
{window.location.href=`/glcc/2022/subjects/detail/${item.id}`}}>{item.taskName}
+
{window.location.href=`/glcc/${year}/subjects/detail/${item.id}`}}>{item.taskName}
导师姓名: {item.tutorName}
{item.tutorMail &&
邮箱地址: {item.tutorMail}
}
@@ -35,16 +35,16 @@ export default ({ detail, projectId, applyTaskId, applyTask }) => {
{item.taskUrl &&
}
{/* 报名详情按钮 */}
- {applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && }
+ {year === "2023" && applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && }
{/* 课题申请时间范围内: 申请课题 */}
{/* 第一次报名 */}
- {false && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && }
+ {year === "2023" && period === "stuApply" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && }
{/* 第二次报名 锁定状态 */}
- {false && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && (item.locked ? : )}
+ {year === "2023" && period === "stuApply1" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && (item.locked ? : )}
{/* 查看课题详情按钮 */}
-
+
¥{item.taskReward}
diff --git a/src/glcc/openmmlab/sliderLeft/index.jsx b/src/glcc/openmmlab/sliderLeft/index.jsx
index b3d13bf47..31c0ee591 100644
--- a/src/glcc/openmmlab/sliderLeft/index.jsx
+++ b/src/glcc/openmmlab/sliderLeft/index.jsx
@@ -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 中的图像&视频生成和编辑的开源算法平台,涵盖 GAN,diffusion model 多种生成模型,支持 Stable Diffusion 的微调和多种 diffusion 应用。同时支持图像修复、图文生成、3D生成、图像修补、抠图、超分辨率和生成等多种任务。利用 MMagic,通过组合不同模块轻松构建自定义的生成模型。",
+ source: 'https://www.gitlink.org.cn/api/attachments/422478.mp4',
+ img: 'https://www.gitlink.org.cn/api/attachments/388256',
+ 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 (
- {arithmeticArr.map(item => {
+ {arr.map(item => {
return
{item.type == 'img' &&

}
@@ -97,8 +151,8 @@ function SliderLeft() {
{
item.name === 'MMDetection3D算法演示' &&
7 个数据集
-
17 种不同算法
-
80+ 个预训练模型
+
{pathname.endsWith("/2022") ? "17" : "30+"} 种不同算法
+
{pathname.endsWith("/2022") ? "80" : "90"}+ 个预训练模型
}
diff --git a/src/glcc/openmmlab/sliderLeft/index.scss b/src/glcc/openmmlab/sliderLeft/index.scss
index 61d1ca106..828579a1e 100644
--- a/src/glcc/openmmlab/sliderLeft/index.scss
+++ b/src/glcc/openmmlab/sliderLeft/index.scss
@@ -90,6 +90,9 @@
// max-height: 100%;
}
}
+ .MMagic .introduce-video{
+ max-height: 112%;
+ }
.MMDetection3D,.MMClassification {
padding:30px 0;
diff --git a/src/glcc/openmmlab/sliderRight/index.jsx b/src/glcc/openmmlab/sliderRight/index.jsx
index 7dd8eb961..876bd6dfb 100644
--- a/src/glcc/openmmlab/sliderRight/index.jsx
+++ b/src/glcc/openmmlab/sliderRight/index.jsx
@@ -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 (
diff --git a/src/glcc/project/component/projectDetail.jsx b/src/glcc/project/component/projectDetail.jsx
index a76eee080..8a882b184 100644
--- a/src/glcc/project/component/projectDetail.jsx
+++ b/src/glcc/project/component/projectDetail.jsx
@@ -39,13 +39,13 @@ export default ({ detail, projectId, applyTaskId, period, showTask=true, applyTa
{item.taskUrl &&
}
{/* 报名详情按钮 */}
- {applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) &&
}
+ {round === 2 && applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) &&
}
{/* 课题申请时间范围内: 申请课题 */}
{/* 第一次报名 */}
- {period === "stuApply" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) &&
}
+ {round === 2 && period === "stuApply" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) &&
}
{/* 第二次报名 锁定状态 */}
- {period === "stuApply1" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && (item.locked ?
:
)}
+ {round === 2 && period === "stuApply1" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && (item.locked ?
:
)}
{/* 查看课题详情按钮 */}
diff --git a/src/glcc/project/taskDetail/index.jsx b/src/glcc/project/taskDetail/index.jsx
index bd678b75a..f551a5d0a 100644
--- a/src/glcc/project/taskDetail/index.jsx
+++ b/src/glcc/project/taskDetail/index.jsx
@@ -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) {
{detail.taskDesc}
{/* 报名详情按钮 */}
- {applyTaskId && Object.keys(applyTaskId).includes(taskId.toString()) &&
}
+ {round === currentRound && applyTaskId && Object.keys(applyTaskId).includes(taskId.toString()) &&
}
{/* 课题申请时间范围内: 申请课题 */}
{/* 第一次报名 */}
- {period==="stuApply" && !(applyTaskId && Object.keys(applyTaskId).includes(taskId.toString())) &&
}
+ {round === currentRound && period==="stuApply" && !(applyTaskId && Object.keys(applyTaskId).includes(taskId.toString())) &&
}
{/* 第二次报名 锁定状态 */}
- {period === "stuApply1" && !(applyTaskId && Object.keys(applyTaskId).includes(taskId.toString())) && (detail.locked ?
:
)}
+ {round === currentRound && period === "stuApply1" && !(applyTaskId && Object.keys(applyTaskId).includes(taskId.toString())) && (detail.locked ?
:
)}
diff --git a/src/glcc/project/taskList/index.jsx b/src/glcc/project/taskList/index.jsx
index 26f36eb09..11cec9f9d 100644
--- a/src/glcc/project/taskList/index.jsx
+++ b/src/glcc/project/taskList/index.jsx
@@ -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 (
{/* 报名详情按钮 */}
- {applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && {window.location.href=`/glcc/student/apply/${item.id}`}}>报名详情}
+ {round === currentRound && applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && {window.location.href=`/glcc/student/apply/${item.id}`}}>报名详情}
{/* 取消按钮5.26-6.25 */}
- {(period === "stuApply" || period === "stuApply1") && applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && {deleteItem(item.id)}}>}
+ {round === currentRound && (period === "stuApply" || period === "stuApply1") && applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && {deleteItem(item.id)}}>}
{/* 课题申请时间范围内: 申请课题 */}
{/* 第一次报名 */}
- {period === "stuApply" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && {applyTask(item.id)}}>申请课题}
+ {round === currentRound && period === "stuApply" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && {applyTask(item.id)}}>申请课题}
{/* 第二次报名 锁定状态 */}
- {period === "stuApply1" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && (item.locked ? 申请课题 : {applyTask(item.id, item.locked)}}>申请课题)}
+ {round === currentRound && period === "stuApply1" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && (item.locked ? 申请课题 : {applyTask(item.id, item.locked)}}>申请课题)}
)
})