Compare commits

...

40 Commits

Author SHA1 Message Date
Zgna 4182358e42 文章标题高亮显示 2023-09-18 15:45:28 +08:00
谢思 4913bc56a8 Merge branch 'gitlink_server' of https://gitlink.org.cn/Gitlink/forgeplus-react into gitlink_server 2023-09-12 09:44:23 +08:00
谢思 0eb93afe3b Merge branch 'feature_news' of https://gitlink.org.cn/durian/forgeplus-react into gitlink_server 2023-09-12 09:41:49 +08:00
谢思 09c7f3bd02 图片等比拉伸 2023-09-12 09:39:35 +08:00
durian 921835ef72 Merge pull request 'ccf专区首页-新闻banner固定高宽+会员分类展示' (#576) from durian/forgeplus-react:feature_news into gitlink_server 2023-09-12 09:23:18 +08:00
谢思 5bf692f3d4 图片调整为标准的4比3 2023-09-12 09:19:03 +08:00
谢思 0ee61b1775 ccf专区首页-新闻banner固定高宽+会员分类展示 2023-09-11 17:23:19 +08:00
谢思 f696a84e42 Merge branch 'gitlink_server' of https://gitlink.org.cn/Gitlink/forgeplus-react into gitlink_server 2023-09-08 15:22:02 +08:00
durian bcfdfdc1dc Merge pull request '0908上线' (#575) from durian/forgeplus-react:feature_news into pre_gitlink_server 2023-09-08 14:41:17 +08:00
谢思 76c6e5d451 同步显示接口报错返回内容 2023-09-08 14:32:31 +08:00
谢思 51ba88809f 分支显示tag加长 2023-09-08 14:31:46 +08:00
谢思 6ca7a3040c 名称过长截断 2023-09-08 14:30:26 +08:00
谢思 0a53c76e9c 社区简介修改为项目简介 2023-09-08 14:29:44 +08:00
谢思 e73a9b7d20 优化附件显示效果 2023-09-07 15:30:46 +08:00
谢思 7fa31a3ec7 优化 2023-09-07 15:23:43 +08:00
谢思 a18f4c6ca6 添加用户主页跳转 2023-09-07 15:23:23 +08:00
谢思 68a004be4c 修复issue 2023-09-07 10:35:48 +08:00
谢思 12dfc71793 资源改版 2023-09-06 16:17:35 +08:00
caishi 049dccd086 save 2023-09-01 14:26:34 +08:00
durian 83c344a06d Merge pull request '0831上线' (#573) from durian/forgeplus-react:pre_gitlink_server into pre_gitlink_server 2023-08-31 16:13:29 +08:00
谢思 cecf29e7c2 身份认证下线入口 2023-08-31 16:05:58 +08:00
谢思 71937ebd58 新建分支填充默认分支 2023-08-31 16:05:24 +08:00
谢思 f3a28a24d5 优化ccf首页效果 2023-08-31 16:04:49 +08:00
谢思 358650e2b1 Merge branch 'pre_gitlink_server' of https://gitlink.org.cn/Gitlink/forgeplus-react into pre_gitlink_server 2023-08-31 14:11:03 +08:00
谢思 17a3fee305 调整ccf专区,下线个人建站入口 2023-08-31 14:10:47 +08:00
caishi f091da0bbf pull 2023-08-31 13:57:59 +08:00
caishi ec8168de59 merge 2023-08-31 13:56:50 +08:00
caishi 34d0eea677 编辑-权限-developer也要有 2023-08-31 10:25:56 +08:00
caishi 50276ce1cb update 2023-08-30 17:11:23 +08:00
caishi 79bcb52a34 拒绝合并请求-权限设置 2023-08-30 16:54:56 +08:00
caishi d6ac3631c7 分支名可包含/ 2023-08-30 10:17:03 +08:00
caishi 04014eb2ff 分支设置 2023-08-24 15:16:39 +08:00
caishi d3f51add72 save 2023-08-23 11:30:30 +08:00
namezlx 955a62e3a0 Merge branch 'gitlink_server' into pre_gitlink_server 2023-08-18 16:12:27 +08:00
namezlx 6995a898d9 'update-glcc' 2023-08-18 16:07:49 +08:00
namezlx dfacb92225 '配置项' 2023-08-18 13:48:15 +08:00
namezlx 81161efb75 Merge branch 'gitlink_server' into pre_gitlink_server 2023-08-18 13:44:31 +08:00
namezlx f00b9830bf '样式修复' 2023-08-18 13:40:36 +08:00
caishi 3545ac1516 Merge pull request '前端代码合并' (#571) from gitlink_server into pre_gitlink_server 2023-08-16 14:20:10 +08:00
caishi 6e6adde752 pr 2023-08-15 14:36:23 +08:00
31 changed files with 469 additions and 231 deletions

78
package-lock.json generated
View File

@ -4367,7 +4367,7 @@
},
"cross-env": {
"version": "7.0.3",
"resolved": "https://registry.npmmirror.com/cross-env/-/cross-env-7.0.3.tgz",
"resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz",
"integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==",
"dev": true,
"requires": {
@ -4376,7 +4376,7 @@
"dependencies": {
"cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-7.0.3.tgz",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
"dev": true,
"requires": {
@ -4387,13 +4387,13 @@
},
"path-key": {
"version": "3.1.1",
"resolved": "https://registry.npmmirror.com/path-key/-/path-key-3.1.1.tgz",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
"dev": true
},
"shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/shebang-command/-/shebang-command-2.0.0.tgz",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
"dev": true,
"requires": {
@ -4402,13 +4402,13 @@
},
"shebang-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/shebang-regex/-/shebang-regex-3.0.0.tgz",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
"dev": true
},
"which": {
"version": "2.0.2",
"resolved": "https://registry.npmmirror.com/which/-/which-2.0.2.tgz",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"dev": true,
"requires": {
@ -8694,6 +8694,14 @@
}
}
},
"html-parse-stringify": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz",
"integrity": "sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==",
"requires": {
"void-elements": "3.1.0"
}
},
"html-webpack-plugin": {
"version": "4.5.2",
"resolved": "http://173.15.15.82:8081/repository/npm-all/html-webpack-plugin/-/html-webpack-plugin-4.5.2.tgz",
@ -9140,6 +9148,29 @@
"resolved": "http://173.15.15.82:8081/repository/npm-all/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz",
"integrity": "sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ=="
},
"i18next": {
"version": "23.4.5",
"resolved": "https://registry.npmmirror.com/i18next/-/i18next-23.4.5.tgz",
"integrity": "sha512-XXALnva7/5H+kg7TjDsmzY3jRypuSJvjR1eUWtt11yUgsOqjZFq/mnaujJ/XpVWhUJU75QhCUhrZqAarlYpOSQ==",
"requires": {
"@babel/runtime": "^7.22.5"
},
"dependencies": {
"@babel/runtime": {
"version": "7.22.11",
"resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.22.11.tgz",
"integrity": "sha512-ee7jVNlWN09+KftVOu9n7S8gQzD/Z6hN/I8VBRXW4P1+Xe7kJGXMwu8vds4aGIMHZnNbdpSWCfZZtinytpcAvA==",
"requires": {
"regenerator-runtime": "^0.14.0"
}
},
"regenerator-runtime": {
"version": "0.14.0",
"resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz",
"integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA=="
}
}
},
"iconv-lite": {
"version": "0.6.3",
"resolved": "http://173.15.15.82:8081/repository/npm-all/iconv-lite/-/iconv-lite-0.6.3.tgz",
@ -11195,7 +11226,7 @@
"memory-fs": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz",
"integrity": "sha512-cda4JKCxReDXFXRqOHPQscuIYg1PvxbE2S2GP45rnwfEK+vZaXC8C1OFvdHIbgw0DLzowXGVoxLaAmlgRy14GQ==",
"integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=",
"dev": true,
"requires": {
"errno": "^0.1.3",
@ -14574,7 +14605,7 @@
},
"react-copy-to-clipboard": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.0.tgz",
"resolved": "https://registry.npmmirror.com/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.0.tgz",
"integrity": "sha512-k61RsNgAayIJNoy9yDsYzDe/yAZAzEbEgcz3DZMhF686LEyukcE1hzurxe85JandPUG+yTfGVFzuEw3xt8WP/A==",
"requires": {
"copy-to-clipboard": "^3.3.1",
@ -14850,6 +14881,30 @@
}
}
},
"react-i18next": {
"version": "13.2.0",
"resolved": "https://registry.npmmirror.com/react-i18next/-/react-i18next-13.2.0.tgz",
"integrity": "sha512-YD8xMc+I0jkHHLotd8ERMzZ53hMaCBVLCndbcbBveJn3FbppRP4jyYOAkmR8XItN01sTD9ilAjoEjpH1i42IgA==",
"requires": {
"@babel/runtime": "^7.22.5",
"html-parse-stringify": "^3.0.1"
},
"dependencies": {
"@babel/runtime": {
"version": "7.22.11",
"resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.22.11.tgz",
"integrity": "sha512-ee7jVNlWN09+KftVOu9n7S8gQzD/Z6hN/I8VBRXW4P1+Xe7kJGXMwu8vds4aGIMHZnNbdpSWCfZZtinytpcAvA==",
"requires": {
"regenerator-runtime": "^0.14.0"
}
},
"regenerator-runtime": {
"version": "0.14.0",
"resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz",
"integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA=="
}
}
},
"react-infinite-scroller": {
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/react-infinite-scroller/-/react-infinite-scroller-1.2.6.tgz",
@ -16300,7 +16355,7 @@
},
"sass-loader": {
"version": "7.3.1",
"resolved": "http://173.15.15.82:8081/repository/npm-all/sass-loader/-/sass-loader-7.3.1.tgz",
"resolved": "https://registry.npmmirror.com/sass-loader/-/sass-loader-7.3.1.tgz",
"integrity": "sha512-tuU7+zm0pTCynKYHpdqaPpe+MMTQ76I9TPZ7i4/5dZsigE350shQWe5EZNl5dBidM49TPET75tNqRbcsUZWeNA==",
"dev": true,
"requires": {
@ -19166,6 +19221,11 @@
"integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==",
"dev": true
},
"void-elements": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/void-elements/-/void-elements-3.1.0.tgz",
"integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w=="
},
"w3c-hr-time": {
"version": "1.0.2",
"resolved": "http://173.15.15.82:8081/repository/npm-all/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz",

View File

@ -27,6 +27,7 @@
"editor.md": "^1.5.0",
"flv.js": "^1.5.0",
"fs-extra": "3.0.1",
"i18next": "^23.4.5",
"immutability-helper": "^2.6.6",
"install": "^0.12.2",
"intersection-observer": "^0.12.2",
@ -77,6 +78,7 @@
"react-dev-utils": "^9.2.0-next.80",
"react-dom": "^16.13.1",
"react-hot-loader": "^4.12.20",
"react-i18next": "^13.2.0",
"react-infinite-scroller": "^1.2.4",
"react-loadable": "^5.3.1",
"react-monaco-editor": "0.37",

View File

@ -18,6 +18,10 @@ const Name = styled.div`{
height:22px;
line-height:22px;
margin-bottom:7px;
width: 170px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}`
const Time = styled.div`{
color:#888;

View File

@ -0,0 +1,58 @@
import React from 'react';
import { Link } from 'react-router-dom';
import { tempEnum } from '../tempInfo';
import Crown from '../img/crown.png';
import Nodata from '../../Nodata';
import nodata from '../img/nodata.png';
function Member(props) {
const { vipLists, temp } = props;
return(
<div className="vip_list">
{
vipLists.map((i,k)=>{
return(
<div className="vip_list_card">
<div className="card_title">
<img src={Crown} alt="" width="37px" style={{marginBottom:5,marginRight:5}}/>
<div>
<div>
{i.typeName}
</div>
{ temp === tempEnum.zone1 && <div className="linear_gradient">{i.typeName}</div> }
</div>
</div>
<p className="card_desc">{i.typeIntroduction}</p>
{
i.zoneMemberList && i.zoneMemberList.length > 0 ?
<ul className="card_ul">
{
i.zoneMemberList.map((j,key)=>{
return(
<li className="card_u_li">
<div className="card_u_wrap">
<Link to={`/${j.login}`} ><img src={j.imageUrl} alt="" /></Link>
<div className="card_u_info">
<div className="card_u_up"><span className="card_name task-hide">{j.name}</span>{j.memberLevel && <span className="card_tag">{j.memberLevel}</span> }</div>
<p className="card_u_down task-hide-2">{j.introduction}</p>
</div>
</div>
</li>
)
})
}
</ul>
:
(
temp === tempEnum.zone1 ? <Nodata _html="暂无数据" img={ nodata }/> : <Nodata _html="暂无数据" />
)
}
</div>
)
})
}
</div>
)
}
export default Member;

View File

@ -4,31 +4,18 @@ import { httpUrl } from '../fetch';
import { Link } from 'react-router-dom';
import shijian from '../img/shijian.png';
import xuexi from '../img/xuexiguanli.png';
import { getHomePageList, gethomePageDocList, getAllList, getNewsAllList } from '../api';
import { getHomePageList, gethomePageDocList, getAllList, getNewsAllList, getVIPLists } from '../api';
import axios from 'axios';
import Partner from '../Component/partner';
import MemberList from '../Component/memberList';
import '../indexZonebyCCF.scss';
import '../indexZone1.scss';
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';
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="" />
}
function HeaderPageCCF(props) {
const [projectList, setProjectList] = useState(undefined);
const [personList, setPersonList] = useState(undefined);
@ -37,6 +24,22 @@ function HeaderPageCCF(props) {
const { deptId, cateId } = props.match.params;
const { data, id, temp } = props;
const [mainList, setMainList] = useState(undefined);
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)
}
useEffect(() => {
if (id||cateId) {
@ -49,11 +52,19 @@ function HeaderPageCCF(props) {
}, [id,cateId])
function getPersonList() {
getHomePageList(id).then(result => {
if (result) {
setPersonList(result.data.rows);
}
}).catch(error => { })
//
// getHomePageList(id).then(result => {
// if (result) {
// setPersonList(result.data.rows);
// }
// }).catch(error => { })
//
getVIPLists(id, {isHomepage: 1}).then(response=>{
if(response){
const list = response.data.rows && response.data.rows.filter(item=>item.zoneMemberList);
setPersonList(list);
}
})
}
function getNewsList() {
@ -99,14 +110,15 @@ function HeaderPageCCF(props) {
}
}).catch(error => { })
}
console.log(tag)
return (
<div className="zone_box">
<div className="zone_box pb100">
{
//
data && data.cmsShow === 1 && newsList && newsList.length >= 0 &&
<div className="zone_news">
<p className="in_title mb10">{data.homepageCmsTitle}</p>
<div className="boxmain" style={{ display: "flex" }}>
<p className="in_title mb50">{data.homepageCmsTitle}</p>
<div className="boxmain mb100" style={{ display: "flex" }}>
<div className="zone_new_first">
<Slider {...setting}>
{
@ -114,7 +126,9 @@ function HeaderPageCCF(props) {
newsList.map((i, k) => {
return (
<div className="regform" key={k}>
<img src={i.headImg || img1} alt="" height="595px" style={{ width: "100%", objectFit: "cover" }} onClick={()=>{window.location.href=`/zone/${deptId}/newdetail/${i.id}`}} />
<div className="newsBannerBox">
<img src={i.headImg || img1} alt="" className='newsImg' onClick={()=>{window.location.href=`/zone/${deptId}/newdetail/${i.id}`}} />
</div>
</div>
)
})
@ -123,18 +137,18 @@ function HeaderPageCCF(props) {
}
</Slider>
</div>
<ul className={`zone_new_three ${newsList.length < 4 ? "flexStart" : "spaceeTween"}`}>
<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)"}}>
<Link className="zone_n_title" to={`/zone/${deptId}/newdetail/${i.id}`}>{i.name}</Link>
<Link className="zone_n_title" to={`/zone/${deptId}/newdetail/${i.id}`} style={{color:k===tag?"#466aff":"black"}} >{i.name}</Link>
<p className="zone_n_value">
<span className="font-15" style={{ color: "#8d95a3" }}>
<img src={shijian} alt="" className="mr3 photo" />
{i.publishTime}
</span>
<p className="font-15 flexCenter zone_btn" style={{ color: '#8d95a3' }} key={k} ><i className="iconfont icon-liulan font-15 lg ml7 mr5 lh26 icontianjiadaohangcolors" style={{ color: "#8d95a3" }} ></i>{i.visits}</p>
<p className="font-15 flexCenter zone_btn" style={{ color: '#8d95a3' }}><i className="iconfont icon-liulan font-15 lg ml7 mr5 lh26 icontianjiadaohangcolors" style={{ color: "#8d95a3" }} ></i>{i.visits}</p>
</p>
</li>
)
@ -230,9 +244,10 @@ function HeaderPageCCF(props) {
{
//
data && data.memberShow === 1 && personList && personList.length > 0 &&
<div className="zone_contributor">
<div className={`zone_contributor boxmain ${temp}_VIP_box`}>
<p className="in_title">{data.homepageMemberTitle}</p>
{
<MemberList vipLists={personList} temp={temp}/>
{/* {
<ul className="boxmain zone_c_lists">
{
personList.map((i, k) => {
@ -246,7 +261,7 @@ function HeaderPageCCF(props) {
})
}
</ul>
}
} */}
</div>
}

View File

@ -198,7 +198,7 @@ function ProjectSource(props) {
<span>{item.titleStr}</span>
);
return (
<TreeNode title={title} key={item.key + ""} dataRef={item} className='menuHcNode font-15'>
<TreeNode title={title} key={item.key + ""} isLeaf={item.isFile} dataRef={item} className='menuHcNode font-15'>
{renderTreeNodes(item.children)}
</TreeNode>
);
@ -214,16 +214,18 @@ function ProjectSource(props) {
{
wikiList && (wikiList.length > 0 ? <Box className='zoneHelpBox'>
{/* wiki目录导航 */}
<div className='leftMenuHC mr20'>
<Search
allowClear
placeholder="输入关键字搜索文件"
className="searchHC mb10"
onSearch={changeSearchValue}
/>
<DirectoryTree onSelect={selectTree} expandedKeys={expandedKeys} onExpand={onExpand} autoExpandParent={autoExpandParent} showIcon={false}>
{renderTreeNodes(initMenuList)}
</DirectoryTree>
<div className='leftMenuBox mr20'>
<div className='leftMenuHC'>
<Search
allowClear
placeholder="输入关键字搜索文件"
className="searchHC mb10"
onSearch={changeSearchValue}
/>
<DirectoryTree onSelect={selectTree} expandedKeys={expandedKeys} onExpand={onExpand} autoExpandParent={autoExpandParent} showIcon={false}>
{renderTreeNodes(initMenuList)}
</DirectoryTree>
</div>
</div>
{/* 内容区 */}
{wikiDetail && <LongWidth className='wikiContentBox'>

View File

@ -1,5 +1,5 @@
import React , { useEffect , useState } from 'react';
import { Input , Pagination, Spin } from 'antd';
import { Input , Pagination, Spin, Tag } from 'antd';
import SourceIcon from '../img/sourceIcon.png';
import { Link } from 'react-router-dom';
import axios from 'axios';
@ -7,6 +7,7 @@ import { getSourceTypeList , getSourceList , getSourceZoneList } from '../api';
import Nodata from '../../Nodata';
import ImgGreen from '../img/green_nodata.png';
import '../indexZone1.scss';
import { FlexAJ } from '../../Component/layout';
const { Search } = Input;
@ -53,7 +54,7 @@ function Source(props){
function getLists(){
setIsSpin(true);
getSourceList({
id,pageSize:limit,pageNum:page,typeId:chooseTypeId,domainId:chooseZoneId,name:search
id,pageSize:limit,pageNum:page,searchTypeId:chooseTypeId,domainId:chooseZoneId,name:search
}).then(response=>{
if(response){
setSourceList(response.data.rows);
@ -98,7 +99,7 @@ function Source(props){
{
zoneList.map((i,k)=>{
return(
<li key={k} onClick={()=>{setChooseZoneId(i.id);window.scrollTo(0,450)}} className={chooseZoneId && chooseZoneId === i.id ? "active":"" }>{i.name}</li>
<li key={k} onClick={()=>{setChooseZoneId(i.id);window.scrollTo(0,450)}} className={`${chooseZoneId && chooseZoneId === i.id ? "active":""} task-hide`}>{i.name}</li>
)
})
}
@ -114,7 +115,7 @@ function Source(props){
{
typeList.map((i,k)=>{
return(
<li key={k} onClick={()=>{setChooseTypeId(i.id);window.scrollTo(0,450)}} className={chooseTypeId && chooseTypeId === i.id ? "active":"" }>{i.name}</li>
<li key={k} onClick={()=>{setChooseTypeId(i.id);window.scrollTo(0,450)}} className={`${chooseTypeId && chooseTypeId === i.id ? "active":""} task-hide`}>{i.name}</li>
)
})
}
@ -138,12 +139,19 @@ function Source(props){
{i.summary}
</p>
<div className="s_infos">
<p className="load_count">
<img src={SourceIcon} alt="" width="18px" className="mr5"/><span style={{color:"#5e6685"}}>{i.downloadCount}</span>
</p>
<FlexAJ>
{temp === "zone" && <span className='domainNameBox task-hide'>{i.domainName}</span>}
<p className="load_count">
<img src={SourceIcon} alt="" width="18px" className="mr5" style={{marginTop: '-4px'}}/><span style={{color:"#5e6685"}}>{i.downloadCount}</span>
</p>
</FlexAJ>
{temp === "zone1" && <p className="load_source">
<span>{i.domainName}</span>
<span>{i.typeName}</span>
{i.zoneResourceTypeList && <span>
{i.zoneResourceTypeList.reduce((pre, cur)=>{
return pre ? `${pre}, ${cur.name}` : cur.name
}, '')}
</span>}
</p>
}
</div>

View File

@ -7,6 +7,8 @@ import { Link } from 'react-router-dom';
import axios from 'axios';
import { Base64 } from 'js-base64';
import { httpUrl } from '../fetch';
import { AlignCenter, FlexAJ } from '../../Component/layout';
import SourceIcon from '../img/sourceIcon.png';
function SourceDetail(props){
@ -36,7 +38,21 @@ function SourceDetail(props){
{
detail &&
<div className="source_detail_box">
<div className="s_d_title">{detail.name}</div>
<div className="s_d_title">
<FlexAJ>
<AlignCenter style={{flex: 1}}>
<span className='domainNameBoxD font-13 mr15'>{detail.domainName}</span>
<span className='font-22' style={{flex: 1}}>{detail.name}</span>
</AlignCenter>
<div className="load_count">
<img src={SourceIcon} alt="" width="18px" className="mr5" style={{marginTop: '-4px'}}/><span style={{color:"#5e6685"}}>{detail.downloadCount}</span>
</div>
</FlexAJ>
{detail.createUser && detail.createUser.avatar && <Link to={`/${detail.createUser.userName}`}><img alt='' src={detail.createUser.avatar} className='publicUserAvatar mr10'/></Link>}
{detail.createUser && <Link className='mr20' to={`/${detail.createUser.userName}`}>{detail.createUser.nickName}</Link>}
<span>发布于{detail.updateTime || detail.createTime}</span>
</div>
<div className='pb20'>{detail.summary}</div>
{
detail.fileList && detail.fileList.length > 0 &&
<ul className="files_box">
@ -46,6 +62,7 @@ function SourceDetail(props){
<li>
<img src={SourceFile} alt="" width="20px" className="mr12"/>
<span className="task-hide">{i.fileOriginName}</span>
<span style={{width: '340px'}}>{i.zoneResourceType.name}</span>
<span>{i.fileSizeInfo}</span>
<a href={`${httpUrl}/file/open/download/${i.fileId}`} download className="f_b_load primaryColor">下载</a>
</li>
@ -54,16 +71,6 @@ function SourceDetail(props){
}
</ul>
}
{ detail.introduction &&
<div style={{padding:"20px 0px"}}>
<RenderHtml
className="source_detail imageLayerParent"
value={detail.introduction ? Base64.decode(detail.introduction):""}
url={props.history.location}
/>
</div>
}
</div>
}
</div>

View File

@ -7,6 +7,7 @@ import { tempConfig, tempEnum } from '../tempInfo'
import MemberApply from '../Component/memberApply';
import { getVIPLists, getAuditStatus, applyJoin } from '../api';
import nodata from '../img/nodata.png';
import MemberList from '../Component/memberList';
import '../indexZone1.scss';
@ -43,7 +44,6 @@ function ZoneVIP(props){
function getMemberStatus() {
getAuditStatus(id).then(res => {
console.log(res)
if (res && res.data && res.data.code === 200) {
setMemberStatus(res.data.data)
} else {
@ -83,58 +83,9 @@ function ZoneVIP(props){
<Spin spinning={isSpin}>
<div style={{minHeight:400}}>
{
vipLists && vipLists.length> 0 &&
<div className="vip_list">
{
vipLists.map((i,k)=>{
return(
<div className="vip_list_card">
<div className="card_title">
<img src={Crown} alt="" width="37px" style={{marginBottom:5,marginRight:5}}/>
<div>
<div>
{i.typeName}
</div>
{ temp === tempEnum.zone1 && <div className="linear_gradient">{i.typeName}</div> }
</div>
</div>
<p className="card_desc">{i.typeIntroduction}</p>
{
i.zoneMemberList && i.zoneMemberList.length > 0 ?
<ul className="card_ul">
{
i.zoneMemberList.map((j,key)=>{
return(
<li className="card_u_li">
<div className="card_u_wrap">
<Link to={`/${j.login}`} ><img src={j.imageUrl} alt="" /></Link>
<div className="card_u_info">
<div className="card_u_up"><span className="card_name task-hide">{j.name}</span>{j.memberLevel && <span className="card_tag">{j.memberLevel}</span> }</div>
<p className="card_u_down task-hide-2">{j.introduction}</p>
</div>
</div>
</li>
)
})
}
</ul>
:
(
temp === tempEnum.zone1 ? <Nodata _html="暂无数据" img={ nodata }/> : <Nodata _html="暂无数据" />
)
}
</div>
)
})
}
</div>
}
{
vipLists && vipLists.length === 0 &&
<div style={{marginTop:30,backgroundColor:"#fff",padding:"20px"}}>
vipLists && (vipLists.length > 0 ? <MemberList vipLists={vipLists} temp={temp}/> : <div style={{marginTop:30,backgroundColor:"#fff",padding:"20px"}}>
<Nodata _html={"暂无数据"}/>
</div>
</div>)
}
</div>
</Spin>

View File

@ -76,10 +76,11 @@ export function getProjectsTypeLists(id){
})
}
/**专区会员 */
export function getVIPLists(id){
export function getVIPLists(id, params){
return fetch({
url:`/zone/open/${id}/member/overviewList`,
method: 'get',
params
})
}

View File

@ -121,7 +121,6 @@ function Index(props){
}
}).catch(error=>{})
}
console.log(deptId)
return(
<div className="information_main">
{ !sourcedetail && (id ? <PublicBanner {...props} data={data} temp={ temp } adminUrl={adminUrl}/> : <div style={{ width: '100%', height: '450px' }}></div>)}

View File

@ -1380,18 +1380,33 @@
margin-bottom: 14px!important;
}
}
.domainNameBox{
border:1px solid var(--primary-color);
border-radius:2px;
height: 28px;
padding: 0px 12px;
color: var(--primary-color);
max-width: 70%;
}
}
}
}
.source_detail_box{
background-color: #fff;
padding:10px 35px 30px;
padding:10px 35px 70px 30px;
.s_d_title{
padding:25px 0px;
padding:20px 0px 10px;
border-bottom: 1px dashed rgba(141, 149, 172, 0.27);
color:#1f2329;
font-size:22px;
margin-bottom: 20px!important;
&>span{
color: #4c5876;
}
.publicUserAvatar{
width: 24px;
border-radius: 50%;
margin-top: -3px;
}
}
.files_box{
padding:11px 30px;
@ -1405,24 +1420,34 @@
font-size:15px;
min-width: 190px;
&.task-hide{
width: 500px;
width: 450px;
margin-right: 20px;
}
}
}
}
.domainNameBoxD{
display: inline-block;
border:1px solid var(--primary-color);
border-radius:2px;
height: 28px;
padding: 0px 12px;
color: var(--primary-color);
}
}
// 帮助中心
.zoneHelpBox{
.leftMenuBox{
background: #ffffff;
padding: 25px 18px 25px 15px;
}
.leftMenuHC{
width: 290px;
min-height: 500px;
overflow-x: auto;
&::-webkit-scrollbar{
display: none;
}
background: #ffffff;
padding: 25px 15px;
// &::-webkit-scrollbar{
// display: none;
// }
.ant-tree.ant-tree-directory > .menuHcNode span.ant-tree-node-content-wrapper.ant-tree-node-selected, .ant-tree.ant-tree-directory .ant-tree-child-tree > .menuHcNode span.ant-tree-node-content-wrapper.ant-tree-node-selected{
color: var(--primary-color);
}
@ -1445,6 +1470,9 @@
.searchHC .ant-input-search-icon:hover{
color: var(--primary-color);
}
.ant-tree li span.ant-tree-switcher{
width: 10px;
}
}
.wikiTitleHC{
font-weight: 700;

View File

@ -721,7 +721,7 @@
align-items: center;
margin-top: 10px;
.load_count{
margin-right: 10px;
margin-right: 100px;
min-width: 68px;
}
}

View File

@ -11,7 +11,6 @@
width: 0;
.slick-track {
margin-top: 20px;
display: flex;
height: 100%;
@ -21,19 +20,24 @@
div {
height: 100%;
.regform {
img {
position: relative;
z-index: 1;
top: 30px;
}
.newsBannerBox{
display: flex;
align-items: center;
align-content: center;
}
.newsImg{
width: 785px;
height: 590px;
position: relative;
z-index: 1;
}
}
}
}
.slick-slider {
max-height: 595px;
overflow: hidden;
&:hover {
.slick-arrow {
display: block !important;
@ -76,7 +80,7 @@
text-align: left;
left: 50%;
margin-left: -115px;
bottom: 5%;
bottom: 12%;
position: absolute;
display: flex !important;
z-index: 2;
@ -123,15 +127,12 @@
}
}
.zone_new_three {
.zone_new_three_ccf {
margin-left: 30px;
display: flex;
flex-direction: column;
margin-bottom: 100px !important;
top: 50px;
position: relative;
.zone_n_value {
margin-top: 20px;
@ -155,9 +156,9 @@
li {
background-color: #fff;
width: 385px;
padding: 20px !important;
padding: 22px 20px 19px;
border-radius: 4px;
margin-bottom: 21px !important;
margin-bottom: 25px !important;
position: relative;
overflow: hidden;
word-break: break-all;
@ -174,6 +175,9 @@
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
&:hover{
color: #466aff !important;
}
}
}

View File

@ -45,7 +45,6 @@ function Index(props) {
const {branches, total_count} = result.data;
setTotal(total_count)
setList(branches);
setNewFormBranchName(branches[0].name);
}
setIsSpin(false);
}).catch(error=>{setIsSpin(false);})
@ -56,6 +55,7 @@ function Index(props) {
const { author, name} = projectDetail;
document.title = `所有分支-${author.name}/${name}`;
}
setNewFormBranchName(projectDetail && projectDetail.default_branch);
}, [projectDetail])
@ -216,15 +216,15 @@ function Index(props) {
setNewBranchError(undefined);
const value = e.target.value;
if (value) {
const str = '^*/';
const str = '^*';
let reg = /\\/g;
if(reg.test(value)){
setNewBranchError('分支名不能包含下列任何字符:^ * \\ /');
setNewBranchError('分支名不能包含下列任何字符:^ * \\ ');
}else{
for(var i=0;i<str.length;i++){
let s = str[i];
if(value.indexOf(s) > -1){
setNewBranchError('分支名不能包含下列任何字符:^ * \\ /');
setNewBranchError('分支名不能包含下列任何字符:^ * \\ ');
return;
}else{
setNewBranchName(e.target.value);
@ -387,7 +387,7 @@ function Index(props) {
<Input placeholder='请输入分支名称' className='createBranchInput' onChange={checkNewBranchName} maxLength={100}/>
<div className='newBranchError mt5'>{newBranchError}</div>
<div className='font-15 createBranchLabel mt20'>分支起点</div>
<Select showSearch style={{width: '340px'}} className='createBranchInput' placeholder="请选择分支起点" onChange={(value)=>{setNewFormBranchName(value)}} getPopupContainer={triggerNode => triggerNode.parentNode}>
<Select showSearch style={{width: '340px'}} className='createBranchInput' placeholder="请选择分支起点" value={newFormBranchName} onChange={(value)=>{setNewFormBranchName(value)}} getPopupContainer={triggerNode => triggerNode.parentNode}>
{branchList && branchList.map((item, index)=>{
return <Select.Option value={item.name} key={index}>{item.name}</Select.Option>
})}

View File

@ -112,7 +112,7 @@ class MergeItem extends Component {
<Tag className="pr-branch-tag">
<Link
to={`/${item.is_original ? item.fork_project_user : owner}/${ item.is_original ? item.fork_project_identifier : projectsId }/tree/${turnbar(item.pull_request_head)}`}
className="maxW200px task-hide ver-middle" style={{maxWidth:"200px"}}
className="maxW200px task-hide ver-middle" style={{maxWidth:"300px"}}
>
{item.is_original
? item.fork_project_user_name
@ -136,7 +136,7 @@ class MergeItem extends Component {
<Tag className="pr-branch-tag">
<Link
to={`/${owner}/${projectsId}/tree/${turnbar(item.pull_request_base)}`}
className="maxW200px task-hide ver-middle" style={{maxWidth:"200px"}}
className="maxW200px task-hide ver-middle" style={{maxWidth:"300px"}}
>
{project_author_name}: {item.pull_request_base}
</Link>

View File

@ -368,9 +368,11 @@ class MessageCount extends Component {
</Menu>
);
const permission = projectDetail && (projectDetail.permission === "Admin" || projectDetail.permission === "Owner" || projectDetail.permission === "Manager");
const permissionByCodeReview = projectDetail && (projectDetail.permission === "Admin" || projectDetail.permission === "Owner" || projectDetail.permission === "Manager" || projectDetail.permission === "Developer")
const userLogin = current_user && current_user.login;
const operate = userLogin && projectDetail && pr_status === 0 && permission;
const otherPre = data && data.pull_request && projectDetail && (userLogin === data.pull_request.fork_project_user && projectDetail.permission==="");
const permissionByCodeReview = projectDetail && (projectDetail.permission === "Admin" || projectDetail.permission === "Owner" || projectDetail.permission === "Manager" || projectDetail.permission === "Developer" || otherPre);
const operate = userLogin && projectDetail && pr_status === 0 && permission ;
const cancelOperate = userLogin && pr_status === 0 && ( permissionByCodeReview || otherPre);
const open_blockchain = project && project.open_blockchain;
return (
<div>
@ -404,9 +406,9 @@ class MessageCount extends Component {
<Tag className="pr-branch-tag">
<Link
to={`/${data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author}/${data.pull_request.is_original?data.project_identifier:projectsId}/tree/${turnbar(data.pull_request && data.pull_request.head)}`}
className="ver-middle task-hide" style={{maxWidth:"200px"}} title={`${data.pull_request.is_original ? data.pull_request.fork_project_user_name : data.issue.author_name}: ${data.pull_request && data.pull_request.head}`}
className="ver-middle task-hide" style={{maxWidth:"300px"}} title={`${data.pull_request.fork_project_user}: ${data.pull_request && data.pull_request.head}`}
>
{data.pull_request.is_original ? data.pull_request.fork_project_user_name : data.issue.author_name}: {data.pull_request && data.pull_request.head}
{data.pull_request && data.pull_request.fork_project_user}: {data.pull_request && data.pull_request.head}
</Link>
</Tag>
<span className="mr8 ver-middle">
@ -419,9 +421,9 @@ class MessageCount extends Component {
<Tag className="pr-branch-tag">
<Link
to={`/${owner}/${projectsId}/tree/${data.pull_request.base}`}
className="ver-middle task-hide" style={{maxWidth:"200px"}} title={`${data.issue.project_author_name}:${data.pull_request.base}`}
className="ver-middle task-hide" style={{maxWidth:"300px"}} title={`${data.issue.project_author_name}:${data.pull_request.base}`}
>
{data.issue.project_author_name}: {data.pull_request.base}
{data.issue.project_author}: {data.pull_request.base}
</Link>
</Tag>
</div>
@ -520,7 +522,7 @@ class MessageCount extends Component {
</Button>
)}
{operate && (
{cancelOperate && (
<Button
type="danger"
ghost
@ -636,7 +638,7 @@ class MessageCount extends Component {
{...this.props}
{...this.state}
bindFootRef={this.bindFootRef}
pullOwnerLogin={data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.author_login}
pullOwnerLogin={data.pull_request && data.pull_request.fork_project_user}
></MergeLinkFooter>
</div>
) : (

View File

@ -3,6 +3,7 @@ import { Link } from 'react-router-dom';
import { Input , Form , Select , Checkbox , Button , Spin , AutoComplete, Modal } from 'antd';
import { Base64 } from 'js-base64';
import { AlignCenter } from '../Component/layout';
import { withTranslation } from 'react-i18next';
import '../css/index.scss';
import './new.scss'
@ -378,6 +379,23 @@ class Index extends Component {
}
}
changeName=(e)=>{
let value = e.target.value;
const { t } = this.props;
console.log(this.props,t(value,'en'));
if(value){
let reg = /[a-zA-Z0-9]/g;
let strArr = value.match(reg);
if(strArr){
let str = strArr.join("");
this.props.form.setFieldsValue({
repository_name:str
})
}else{
}
}
}
render() {
const { getFieldDecorator } = this.props.form;
// 项目类型deposit-托管项目mirror-镜像项目
@ -537,7 +555,7 @@ class Index extends Component {
required: true, message: '请填写项目名称'
}],
})(
<Input placeholder="例如:团队协作方法与研究" maxLength={50}/>
<Input placeholder="例如:团队协作方法与研究" maxLength={50}/>// onBlur={this.changeName}
)}
</Form.Item>
</AlignCenter>
@ -745,6 +763,6 @@ class Index extends Component {
}
}
const WrappedIndexForm = Form.create({ name: 'NewWorkForm' })(Index);
export default WrappedIndexForm;
export default withTranslation()(WrappedIndexForm);

View File

@ -169,15 +169,15 @@ class UserSubmitComponent extends Component {
callback();
}
if (value) {
const str = '^*/';
const str = '^*';
let reg = /\\/g;
if(reg.test(value)){
callback(<span>分支名不能包含下列任何字符^*\/</span>);
callback(<span>分支名不能包含下列任何字符^*\</span>);
}else{
for(var i=0;i<str.length;i++){
let s = str[i];
if(value.indexOf(s) > -1){
callback(<span>分支名不能包含下列任何字符^*\/</span>);
callback(<span>分支名不能包含下列任何字符^*\</span>);
return;
}else{
continue;

View File

@ -162,10 +162,15 @@ function Index(props) {
<li className={active === 7 ? "active" : ""}><Link to={`/settings/mybot`}><i className="iconfont icon-kaifabot mr5 font-18"></i><span className="text-shodow-bold">我的Bot</span></Link></li>
<li className={active === 8 ? "active" : ""}><Link to={`/settings/installbot`}><i className="iconfont icon-BOTpeizhi mr5 font-17"></i><span className="text-shodow-bold">Bot安装</span></Link></li>
</ul>
<ul className="securityUl">
{/* <ul className="securityUl">
<li>个人建站</li>
<<<<<<< HEAD
<li className={active === 9 ? "active" : ""}><Link to={`/settings/mysite`} onClick={window.scrollTo(0, 0)} ><i className="iconfont icon-liebiaoicon mr5 font-15"></i><span className="text-shodow-bold">我的站点</span></Link></li>
</ul>
=======
<li className={active === 9 ?"active":""}><Link to={`/settings/mysite`}><i className="iconfont icon-liebiaoicon mr5 font-15"></i><span className="text-shodow-bold">我的站点</span></Link></li>
</ul> */}
>>>>>>> 4913bc56a825315e970989217acf13cdd115a53f
</div>
<LongWidth>
<Gap>

View File

@ -6,6 +6,7 @@ import { AlignCenter , WhiteBack , FlexAJ } from '../Component/layout';
import axios from 'axios';
import { Button, Select , Pagination } from 'antd';
import { getBranch } from '../GetData/getData';
import { turnbar , returnbar} from 'educoder';
const Div = styled.div`{
padding:20px 30px;
@ -95,6 +96,11 @@ export default ((props)=>{
setPage(page);
}
function changeBranch(b){
console.log(returnbar(b));
setBranch(returnbar(b));
}
return(
<WhiteBack>
<Title><span className="font-18">分支设置</span></Title>
@ -107,7 +113,7 @@ export default ((props)=>{
branch={branch}
repo_id={ projectDetail && projectDetail.repo_id}
projectsId={projectsId}
changeBranch={setBranch}
changeBranch={changeBranch}
owner={owner}
history={props.history}
branchList = {branchList}
@ -123,13 +129,13 @@ export default ((props)=>{
branch={protectBranch}
repo_id={ projectDetail && projectDetail.repo_id}
projectsId={projectsId}
changeBranch={setProtectBranch}
changeBranch={(b)=>{setProtectBranch(returnbar(b))}}
owner={owner}
history={props.history}
branchList = {branchList}
tagflag={false}
/>
<a className={ protectBranchList && protectBranchList.length > 0?"color-blue ml20":"color-grey ml20"} onClick={()=>settingRule(protectBranch)}>设置分支保护</a>
<a className={ protectBranchList && protectBranchList.length > 0?"color-blue ml20":"color-grey ml20"} onClick={()=>settingRule(turnbar(protectBranch))}>设置分支保护</a>
</AlignCenter>
{
protectBranchList && protectBranchList.length > 0 &&

View File

@ -3,6 +3,7 @@ import { Form, InputNumber , Select, Button , Checkbox , Radio } from "antd";
import Title from "../Component/Title";
import { Cancel } from "../Component/layout";
import axios from "axios";
import { turnbar , returnbar} from 'educoder';
export default Form.create()(
forwardRef(({ form, match, history , showNotification, projectDetail }) => {
@ -68,7 +69,7 @@ export default Form.create()(
let url = "";
if(protects){
// true
url = `/${owner}/${projectsId}/protected_branches/${branch}.json`;
url = `/${owner}/${projectsId}/protected_branches/${turnbar(branch)}.json`;
}else{
//
url = `/${owner}/${projectsId}/protected_branches.json`;
@ -122,7 +123,7 @@ export default Form.create()(
}
return (
<div style={{backgroundColor:"#fff"}}>
<Title>新建'{branch}'保护分支规则</Title>
<Title>新建'{returnbar(branch)}'保护分支规则</Title>
<Form>
<div style={{padding:"20px 30px"}}>
{helper(

View File

@ -55,7 +55,7 @@ function Index(props){
<Menu.Item key="3" className="font-16" onClick={()=>{props.history.push('/settings/phone')}}>手机号管理</Menu.Item>
<Menu.Item key="0" className="font-16" onClick={()=>{props.history.push('/settings/emails')}}>邮箱管理</Menu.Item>
<Menu.Item key="1" className="font-16" onClick={()=>{props.history.push('/settings/password')}}>密码管理</Menu.Item>
<Menu.Item key="4" className="font-16" onClick={()=>{props.history.push('/settings/verification')}}>身份认证</Menu.Item>
{/* <Menu.Item key="4" className="font-16" onClick={()=>{props.history.push('/settings/verification')}}>身份认证</Menu.Item> */}
<Menu.Item key="2" className="font-16" onClick={()=>{props.history.push('/settings/cancel')}}>账号注销</Menu.Item>
</Menu>}
</div>

View File

@ -242,12 +242,12 @@ function EditRepoApplyInfo(props) {
{ pattern: emailreg, message: "请输入正确的邮箱地址"},],
<Input placeholder="输入项目联系人邮箱" onBlur={()=>{verify("name")}}/>
)}
<div className='introArea'>{helper('社区简介',
<div className='introArea'>{helper('项目简介',
'',
'projectIntro',
[{ required: true, message: "请输入社区简介" },
[{ required: true, message: "请输入项目简介" },
{ max: 200, message: '超出限制长度200位字符请重新编辑' }],
<TextArea placeholder="请输入社区简介" onBlur={()=>{verify("intro")}} rows={4}/>
<TextArea placeholder="请输入项目简介" onBlur={()=>{verify("intro")}} rows={4}/>
)}</div>
<div className='introArea'>{helper('项目logo',
'限制上传格式为png、jpg、jpeg限制20M。建议上传大小为382*228',

View File

@ -0,0 +1,8 @@
.lastLineScroll {
max-height: 280px;
overflow-y: scroll;
}
.lastTwoScroll {
max-height: 520px;
overflow-y: scroll;
}

View File

@ -3,8 +3,9 @@ import { Button, Tooltip } from 'antd';
import Nodata from '../../../forge/Nodata';
import { useEffect } from 'react';
import { getProjectById } from '../../api';
import './index.scss';
export default ({ detail, projectId }) => {
export default ({ detail, projectId, listLen }) => {
const [info, setInfo] = useState(detail);
useEffect(()=>{
@ -27,21 +28,29 @@ export default ({ detail, projectId }) => {
<div>项目简介:&nbsp;&nbsp;{info.projectIntro}</div>
</div>
{/* 课题列表 */}
{info.registrationTaskList && info.registrationTaskList.length ? info.registrationTaskList.map((item, index)=>{
return <div className='taskItem mt20' key={index}>
<div className="left">
<div className="taskTitle"><Tooltip title={item.taskName}>{item.taskName}</Tooltip></div>
<div className='mt20 oneLine leftWidth'>导师姓名: &nbsp;&nbsp;{item.tutorName}</div>
{item.tutorMail && <div className='mb20 email oneLine leftWidth'>邮箱地址: &nbsp;&nbsp;<span><Tooltip title={item.tutorMail}>{item.tutorMail}</Tooltip></span></div>}
<div className={
info.registrationTaskList &&
info.registrationTaskList.length &&
listLen == 2 &&
info.registrationTaskList.length >= 2
? 'lastLineScroll' : listLen == 3 &&
info.registrationTaskList.length >= 3 ? 'lastTwoScroll' : '' }>
{info.registrationTaskList && info.registrationTaskList.length ? info.registrationTaskList.map((item, index)=>{
return <div className='taskItem mt20' key={index}>
<div className="left">
<div className="taskTitle"><Tooltip title={item.taskName}>{item.taskName}</Tooltip></div>
<div className='mt20 oneLine leftWidth'>导师姓名: &nbsp;&nbsp;{item.tutorName}</div>
{item.tutorMail && <div className='mb20 email oneLine leftWidth'>邮箱地址: &nbsp;&nbsp;<span><Tooltip title={item.tutorMail}>{item.tutorMail}</Tooltip></span></div>}
</div>
<div className="center">
<div className="taskDesc"><Tooltip title={item.taskDesc}>{item.taskDesc}</Tooltip></div>
{item.taskUrl && <div className="taskUrl oneLine">课题链接: &nbsp;&nbsp;<a href={item.taskUrl} target={"_blank"}>{item.taskUrl}</a></div>}
<div></div>
</div>
<div className="right oneLine taskUrl"><span className='taskReward'>{item.taskReward}</span></div>
</div>
<div className="center">
<div className="taskDesc"><Tooltip title={item.taskDesc}>{item.taskDesc}</Tooltip></div>
{item.taskUrl && <div className="taskUrl oneLine">课题链接: &nbsp;&nbsp;<a href={item.taskUrl} target={"_blank"}>{item.taskUrl}</a></div>}
<div></div>
</div>
<div className="right oneLine taskUrl"><span className='taskReward'>{item.taskReward}</span></div>
</div>
}) : <Nodata _html="课题暂无数据" small={true}/>}
}) : <Nodata _html="课题暂无数据" small={true}/>}
</div>
</div>: <div className="projectDetailBox nodata"><Nodata _html="暂无数据" small={true}/></div>
)
}

View File

@ -14,6 +14,7 @@ const { Search } = Input;
function ProjectList() {
const [data, setData] = useState([]);
const [loading, setLoading] = useState(false);
const [listLen, setListLen] = useState(null);
useEffect(() => {
setLoading(true);
@ -31,11 +32,26 @@ function ProjectList() {
}, [])
// taskList
function changeVisible(visible, item) {
function changeVisible(visible, item, index) {
if (visible) {
let height = document.documentElement.clientWidth / 1920 * 500 + 70 + document.querySelector(`.${item.gitlinkLastUrl}`).offsetTop + item.registrationTaskList.length * 320;
document.querySelector('#taskList').style.height = height + 'px';
// let height = document.documentElement.clientWidth / 1920 * 500 + 70 + document.querySelector(`.${item.gitlinkLastUrl}`).offsetTop + item.registrationTaskList.length * 320;
// document.querySelector('#taskList').style.height = height + 'px';
document.querySelector('#taskList').style.height = 'auto';
//
if(data && data.length && data.length > 0){
const len = data.length;
const num = len%3 == 0 ? 3 : len%3;
//
if(len - index <= num){
setListLen(2)
}
//
if(len - index <= num + 3 && len - index > num){
setListLen(3)
}
}
} else {
setListLen(null);
document.querySelector('#taskList').style.height = 'auto';
}
}
@ -46,10 +62,10 @@ function ProjectList() {
<div className='projectListBox'>
{data && data.map((item, index) => {
return <Popover
onVisibleChange={(visible) => { changeVisible(visible, item) }}
onVisibleChange={(visible) => { changeVisible(visible, item, index) }}
key={index}
placement={(index + 1) % 3 === 0 ? 'bottomRight' : (index + 1) % 3 % 2 === 0 ? 'bottom' : 'bottomLeft'}
content={<ProjectDetail detail={item}/>}
content={<ProjectDetail detail={item} listLen = {listLen} />}
trigger='click'
overlayClassName='projectItemPopover'
autoAdjustOverflow={false}

View File

@ -0,0 +1,8 @@
.lastLineScroll {
max-height: 220px;
overflow-y: scroll;
}
.lastTwoScroll {
max-height: 500px;
overflow-y: scroll;
}

View File

@ -3,8 +3,9 @@ import { Button, message, Tooltip } from 'antd';
import Nodata from '../../../forge/Nodata';
import { useEffect } from 'react';
import { getProjectById } from '../../api';
import './index.scss';
export default ({ detail, projectId, applyTaskId, period, showTask=true, applyTask, id, round }) => {
export default ({ detail, projectId, applyTaskId, period, showTask=true, applyTask, id, round, listLen }) => {
const [info, setInfo] = useState(detail);
useEffect(()=>{
@ -27,33 +28,41 @@ export default ({ detail, projectId, applyTaskId, period, showTask=true, applyTa
<div>项目简介:&nbsp;&nbsp;{info.projectIntro}</div>
</div>
{/* 从项目、课题列表展开的显示课题列表,结果公示页展开的不显示课题列表 */}
{showTask && (info.registrationTaskList && info.registrationTaskList.length > 0 ? info.registrationTaskList.map((item, index)=>{
return <div className='taskItem mt20' key={index}>
<div className="left">
<div className="taskTitle" onClick={()=>{window.location.href=`/glcc/${id}/subjects/detail/${item.id}`}}><Tooltip title={item.taskName}>{item.taskName}</Tooltip></div>
<div className='mt20 oneLine leftWidth'>导师姓名: &nbsp;&nbsp;{item.tutorName}</div>
{item.tutorMail && <div className='mb20 email oneLine leftWidth'>邮箱地址: &nbsp;&nbsp;<span><Tooltip title={item.tutorMail}>{item.tutorMail}</Tooltip></span></div>}
</div>
<div className="center">
<div className="taskDesc">{item.taskDesc}</div>
{item.taskUrl && <div className="taskUrl oneLine">课题链接: &nbsp;&nbsp;<a href={item.taskUrl} target={"_blank"}>{item.taskUrl}</a></div>}
<div>
{/* 报名详情按钮 */}
{round === 2 && applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && <Button onClick={()=>{window.location.href=`/glcc/student/apply/${item.id}`}} className='lookDetail mr10'>报名详情</Button>}
{/* 课题申请时间范围内: 申请课题 */}
{/* 第一次报名 */}
{round === 2 && period === "stuApply" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && <Button type='primary' className='applyBut mr10' onClick={()=>{applyTask(item.id)}}>申请课题</Button>}
{/* 第二次报名 锁定状态 */}
{round === 2 && period === "stuApply1" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && (item.locked ? <Tooltip title={"该课题已有学生入选"}><Button type='primary' className='mr10' disabled>申请课题</Button></Tooltip> : <Button type='primary' className='applyBut mr10' onClick={()=>{applyTask(item.id)}}>申请课题</Button>)}
{/* 查看课题详情按钮 */}
<Button onClick={()=>{window.open(`/glcc/${id}/subjects/detail/${item.id}`)}} className='lookDetail'>课题详情</Button>
<div className={
showTask && info.registrationTaskList &&
info.registrationTaskList.length &&
listLen == 2 &&
info.registrationTaskList.length >= 2
? 'lastLineScroll' : listLen == 3 &&
showTask && info.registrationTaskList.length >= 3 ? 'lastTwoScroll' : '' }>
{showTask && (info.registrationTaskList && info.registrationTaskList.length > 0 ? info.registrationTaskList.map((item, index)=>{
return <div className='taskItem mt20' key={index}>
<div className="left">
<div className="taskTitle" onClick={()=>{window.location.href=`/glcc/${id}/subjects/detail/${item.id}`}}><Tooltip title={item.taskName}>{item.taskName}</Tooltip></div>
<div className='mt20 oneLine leftWidth'>导师姓名: &nbsp;&nbsp;{item.tutorName}</div>
{item.tutorMail && <div className='mb20 email oneLine leftWidth'>邮箱地址: &nbsp;&nbsp;<span><Tooltip title={item.tutorMail}>{item.tutorMail}</Tooltip></span></div>}
</div>
<div className="center">
<div className="taskDesc">{item.taskDesc}</div>
{item.taskUrl && <div className="taskUrl oneLine">课题链接: &nbsp;&nbsp;<a href={item.taskUrl} target={"_blank"}>{item.taskUrl}</a></div>}
<div>
{/* 报名详情按钮 */}
{round === 2 && applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) && <Button onClick={()=>{window.location.href=`/glcc/student/apply/${item.id}`}} className='lookDetail mr10'>报名详情</Button>}
{/* 课题申请时间范围内: 申请课题 */}
{/* 第一次报名 */}
{round === 2 && period === "stuApply" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && <Button type='primary' className='applyBut mr10' onClick={()=>{applyTask(item.id)}}>申请课题</Button>}
{/* 第二次报名 锁定状态 */}
{round === 2 && period === "stuApply1" && !(applyTaskId && Object.keys(applyTaskId).includes(item.id.toString())) && (item.locked ? <Tooltip title={"该课题已有学生入选"}><Button type='primary' className='mr10' disabled>申请课题</Button></Tooltip> : <Button type='primary' className='applyBut mr10' onClick={()=>{applyTask(item.id)}}>申请课题</Button>)}
{/* 查看课题详情按钮 */}
<Button onClick={()=>{window.open(`/glcc/${id}/subjects/detail/${item.id}`)}} className='lookDetail'>课题详情</Button>
</div>
</div>
<div className="right oneLine taskUrl"><span className='taskReward'>{item.taskReward}</span></div>
</div>
<div className="right oneLine taskUrl"><span className='taskReward'>{item.taskReward}</span></div>
</div>
}) : <Nodata _html="课题暂无数据" small={true}/>)}
}) : <Nodata _html="课题暂无数据" small={true}/>)}
</div>
</div>: <div className="projectDetailBox nodata"><Nodata _html="暂无数据" small={true}/></div>
)
}

View File

@ -18,6 +18,7 @@ function ProjectList({ applyTaskId, location, match, applyTask, round, period, m
const [keyword, setKeyword] = useState(openmmlab ? 'openmmlab' : undefined);
const [data, setData] = useState([]);
const [loading, setLoading] = useState(false);
const [listLen, setListLen] = useState(null);
useEffect(() => {
setLoading(true);
@ -67,11 +68,26 @@ function ProjectList({ applyTaskId, location, match, applyTask, round, period, m
})
}, [keyword, round])
function changeVisible(visible, item) {
function changeVisible(visible, item, index) {
if (visible) {
let height = document.documentElement.clientWidth / 1920 * 500 + 70 + document.querySelector(`.${item.gitlinkLastUrl}`).offsetTop + item.registrationTaskList.length * 320;
document.querySelector('#taskList').style.height = height + 'px';
// let height = document.documentElement.clientWidth / 1920 * 500 + 70 + document.querySelector(`.${item.gitlinkLastUrl}`).offsetTop + item.registrationTaskList.length * 320;
// document.querySelector('#taskList').style.height = height + 'px';
document.querySelector('#taskList').style.height = 'auto';
//
if(data && data.length && data.length > 0){
const len = data.length;
const num = len%3 == 0 ? 3 : len%3;
//
if(len - index <= num){
setListLen(2)
}
//
if(len - index <= num + 3 && len - index > num){
setListLen(3)
}
}
} else {
setListLen(null)
document.querySelector('#taskList').style.height = 'auto';
}
}
@ -84,10 +100,10 @@ function ProjectList({ applyTaskId, location, match, applyTask, round, period, m
<div className='projectListBox'>
{data && data.map((item, index) => {
return <Popover
onVisibleChange={(visible) => { changeVisible(visible, item) }}
onVisibleChange={(visible) => { changeVisible(visible, item, index) }}
key={index}
placement={(index + 1) % 3 === 0 ? 'bottomRight' : (index + 1) % 3 % 2 === 0 ? 'bottom' : 'bottomLeft'}
content={<ProjectDetail id={id} detail={item} applyTaskId={applyTaskId} applyTask={applyTask} period={period} round={round}/>}
content={<ProjectDetail id={id} detail={item} applyTaskId={applyTaskId} applyTask={applyTask} period={period} round={round} listLen={listLen} />}
trigger='click'
overlayClassName='projectItemPopover'
autoAdjustOverflow={false}

View File

@ -103,7 +103,8 @@ function Register(props){
callback();
}else{
setGetCaptchaBut(false);
callback(response.data.status === -2 ? `${registerType ? '邮箱' : '手机号'}已被注册` : response.data.message);
// callback(response.data.status === -2 ? `${registerType ? '' : ''}` : response.data.message);
callback(response.data.message);
}
}):callback();setEmailStr(undefined);
}else{