forked from Gitlink/forgeplus-react
issue
This commit is contained in:
parent
4b89f85874
commit
7e186bf765
|
@ -39,7 +39,7 @@ export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog,
|
|||
<div className="projectDetailHead">
|
||||
<span className='name'>{info.projectName}</span>
|
||||
{info.projectType && <span className='type'>{info.projectType}</span>}
|
||||
<p>GitLink项目地址: <a href={info.gitlinkUrl} className='linkUrl'>{info.gitlinkUrl}</a></p>
|
||||
<p>GitLink项目地址: <a href={info.gitlinkUrl} className='linkUrl' target={"_blank"}>{info.gitlinkUrl}</a></p>
|
||||
<div>项目简介: {info.projectIntro}</div>
|
||||
</div>
|
||||
{info.registrationTaskList && info.registrationTaskList.length > 0 ? info.registrationTaskList.map(item=>{
|
||||
|
@ -47,14 +47,14 @@ export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog,
|
|||
<div className="left">
|
||||
<div className="taskTitle" onClick={()=>{window.location.href=`/glcc/student/detail/${item.id}`}}><Tooltip title={item.taskName}>{item.taskName}</Tooltip></div>
|
||||
<div className='mt20 oneLine leftWidth'>导师姓名: {item.tutorName}</div>
|
||||
<div className='mb20 email oneLine leftWidth'>邮箱地址: <span>{item.tutorMail}</span></div>
|
||||
<div className='mb20 email oneLine leftWidth'>邮箱地址: <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">课题链接: <a href={item.taskUrl}>{item.taskUrl}</a></div>}
|
||||
<div className="taskDesc">{item.taskDesc}</div>
|
||||
{item.taskUrl && <div className="taskUrl oneLine">课题链接: <a href={item.taskUrl} target={"_blank"}>{item.taskUrl}</a></div>}
|
||||
<div>
|
||||
{(isStudentApplyDate || studentApplyEnd) && (applyTaskId && item.id && Object.keys(applyTaskId).includes(item.id.toString()) ? <Button onClick={()=>{window.location.href=`/glcc/student/apply/${item.id}`}} className='lookDetail mr10'>报名详情</Button> : isStudentApplyDate && <Button type='primary' className='applyBut mr10' onClick={()=>{applyTask(item.id)}}>申请课题</Button>)}
|
||||
<Button onClick={()=>{window.location.href=`/glcc/student/detail/${item.id}`}} className='lookDetail'>课题详情</Button>
|
||||
<Button onClick={()=>{window.open(`/glcc/student/detail/${item.id}`)}} className='lookDetail'>课题详情</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="right oneLine taskUrl"><span className='taskReward'>¥{item.taskReward}</span></div>
|
||||
|
|
|
@ -6,6 +6,7 @@ import './index.scss';
|
|||
import Loadable from "react-loadable";
|
||||
import Loading from "../../Loading";
|
||||
import { Link } from 'react-router-dom';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
// 项目列表页面
|
||||
const ProjectList = Loadable({
|
||||
|
@ -21,6 +22,9 @@ const TaskList = Loadable({
|
|||
function Project(propsF) {
|
||||
const {location, current_user, showLoginDialog, isStudentApplyDate, studentApplyEnd, applyTaskId, setStudentInfoReset} = propsF;
|
||||
const {pathname} = location;
|
||||
useEffect(()=>{
|
||||
window.scrollTo(0, 0);
|
||||
},[])
|
||||
|
||||
return(
|
||||
<div className="glcc_project">
|
||||
|
|
|
@ -38,7 +38,7 @@ function TaskDetail(props) {
|
|||
|
||||
return (
|
||||
<div className="taskDetailBgBox">
|
||||
<img className="glcc-banner" src={banner} alt=''></img>
|
||||
{/* <img className="glcc-banner" src={banner} alt=''></img> */}
|
||||
<Spin spinning={!detail}>
|
||||
{detail && <div className="bgBox">
|
||||
<div className="detailBox">
|
||||
|
|
|
@ -103,12 +103,14 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial
|
|||
|
||||
// 改变pagesize
|
||||
function onShowSizeChange(current, pageSize){
|
||||
window.scrollTo(0, 0);
|
||||
setCurrent(1);
|
||||
setPageSize(pageSize);
|
||||
}
|
||||
|
||||
// 切换页数
|
||||
function changePage(page, pageSize){
|
||||
window.scrollTo(0, 0);
|
||||
setCurrent(page);
|
||||
}
|
||||
|
||||
|
@ -143,26 +145,11 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial
|
|||
})
|
||||
}, [keyword, current, pageSize, applyTaskId, apply])
|
||||
|
||||
useEffect(()=>{
|
||||
// if(apply){
|
||||
// // 判断用户是否已经登录
|
||||
// if(current_user && current_user.login){
|
||||
// apply && studentApplyList().then(response => {
|
||||
// if (response && response.message === "success") {
|
||||
// console.log(response);
|
||||
// }
|
||||
// })
|
||||
// }else{
|
||||
// showLoginDialog();
|
||||
// }
|
||||
// }
|
||||
},[apply])
|
||||
|
||||
return (
|
||||
<div className="taskList listBox">
|
||||
<div className="list">
|
||||
<div className='search task'>
|
||||
<Checkbox onChange={(e)=>{setCurrent(1);setApply(e.target.checked)}}>已报名</Checkbox>
|
||||
{current_user && current_user.login ? <Checkbox onChange={(e)=>{setCurrent(1);setApply(e.target.checked)}}>已报名</Checkbox> : <div></div>}
|
||||
<Search className='taskSearch' placeholder='请输入课题名称进行搜索' allowClear enterButton onSearch={(value) => { setCurrent(1); setKeyword(value) }} />
|
||||
<div></div>
|
||||
</div>
|
||||
|
|
|
@ -49,12 +49,12 @@ function Apply(props) {
|
|||
|
||||
useEffect(() => {
|
||||
// 进入此页面到填写页面
|
||||
setTimeout(()=>{
|
||||
let clientWidth = document.body.clientWidth;
|
||||
let scrollHeight = 500 * clientWidth / 1920;
|
||||
window.scrollTo(0, scrollHeight);
|
||||
},200);
|
||||
// window.scrollTo(0, 50);
|
||||
// setTimeout(()=>{
|
||||
// let clientWidth = document.body.clientWidth;
|
||||
// let scrollHeight = 500 * clientWidth / 1920;
|
||||
// window.scrollTo(0, scrollHeight);
|
||||
// },200);
|
||||
window.scrollTo(0, 50);
|
||||
|
||||
if (new Date().getTime() < new Date('2022-05-26').getTime()) {
|
||||
// 不在开源夏令营报名时间之内
|
||||
|
@ -346,7 +346,7 @@ function Apply(props) {
|
|||
|
||||
return (
|
||||
<div className="glcc_student_apply">
|
||||
<img className="glcc-banner" src={banner} alt=''></img>
|
||||
{/* <img className="glcc-banner" src={banner} alt=''></img> */}
|
||||
<Spin spinning={loading}>
|
||||
<div className='apply'>
|
||||
<Breadcrumb className='glcc_breadcrumb font-16'>
|
||||
|
@ -361,10 +361,10 @@ function Apply(props) {
|
|||
<div className="head_content">2、本次GLCC夏令营基于GitLink代码托管平台完成编程任务,若您没有平台账户,请先注册后完成课题申请</div>
|
||||
<div className="head_content">3、每位学员最多可申请2个课题,至多有且仅有1个课题可以入选</div>
|
||||
<div className="head_content">4、建议在提交课题申请,与课题导师邮件沟通,详细了解课题描述、编码任务、技能要求&编程语言、预期产出结果等信息,以便您能够选择最适合的课题</div>
|
||||
<div className="head_content">5、提交申请后,请耐心等待,我们会在2022年7月1日公布入围结果。如有任何问题,请添加开源夏令营微信群进行咨询</div>
|
||||
<div className="head_content">5、提交申请后,请耐心等待,我们会在2022年7月1日公布入围结果。如有任何问题,请添加开源夏令营QQ群进行咨询</div>
|
||||
</div>
|
||||
<div className="main-tit">
|
||||
<img src={studentSvg} /><span className="tit-text">学生报名</span>
|
||||
<img src={studentSvg} alt=''/><span className="tit-text">学生报名</span>
|
||||
</div>
|
||||
<div className="form-content">
|
||||
<div className="form-tit">申请课题</div>
|
||||
|
@ -438,7 +438,7 @@ function Apply(props) {
|
|||
onChange={handleChange}
|
||||
>
|
||||
{imageUrl ? <img src={imageUrl} alt="avatar" style={{ maxWidth: '100px', maxHeight: '100px' }} /> : userApplyInfo && userApplyInfo.proveAttachmentId ?
|
||||
<div><img src={`${getUrl()}/api/attachments/${userApplyInfo.proveAttachmentId}`} alt='' /></div> : <div>
|
||||
<div><img src={`${getUrl()}/api/attachments/${userApplyInfo.proveAttachmentId}`} alt='' style={{maxWidth: '100px'}}/></div> : <div>
|
||||
<i className='iconfont icon-tianjiadaohang font-30'></i>
|
||||
<div className="ant-upload-text font-13">请上传学生证明</div>
|
||||
</div>}
|
||||
|
|
Loading…
Reference in New Issue