Merge pull request 'glcc2024等' (#657) from durian/forgeplus-react:gitlink_server into pre_gitlink_server
This commit is contained in:
commit
966de0895f
|
|
@ -6,7 +6,7 @@ const { Search } = Input;
|
|||
const $ = window.$;
|
||||
const isDev = window.location.port == 3007;
|
||||
const isdev2= window.location.hostname ==='www.educoder.net'
|
||||
export const TEST_HOST = "https://testforgeplus.trustie.net/"
|
||||
export const TEST_HOST = "https://testforgeplus.trustie.net"
|
||||
export function getImageUrl(path) {
|
||||
// https://www.educoder.net
|
||||
// https://testbdweb.trustie.net
|
||||
|
|
@ -144,7 +144,7 @@ export function getUrl(path, goTest) {
|
|||
// if (isDev) {
|
||||
// return `${local}${path?path:''}`
|
||||
// }
|
||||
return `${path ? path: ''}`;
|
||||
return `${path ? path: TEST_HOST}`;
|
||||
}
|
||||
|
||||
export function getZoneUrl(path) {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@ function Releases({ owner, projectsId, releaseVersions, distribution }) {
|
|||
:
|
||||
<div className="mt8">
|
||||
暂无发行版
|
||||
{distribution && <Link className="color-blue ml20" to={{pathname:`/${owner}/${projectsId}/releases/new`,state:{stable:true}}}>发布新版本</Link>}
|
||||
{distribution && <Link className="color-blue ml20" to={{pathname:`/${owner}/${projectsId}
|
||||
new`,state:{stable:true}}}>发布新版本</Link>}
|
||||
</div>
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ function Index(props){
|
|||
<p className='titile task-hide'>{item.dataSetName}</p>
|
||||
<p className='task-hide-2 desc'>{item.dataSetDescription}</p>
|
||||
{/* <span className='time'><i className='iconfont icon-a-31shijian'/>2023-09-08 15:54:23</span> */}
|
||||
<span className='time'><i className='iconfont icon-daimakuicon1 font-14 mr8'/>{item.repositoryName}</span>
|
||||
<span className='time task-hide'><i className='iconfont icon-daimakuicon1 font-14 mr8'/>{item.repositoryName}</span>
|
||||
</Link>
|
||||
</li>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -74,13 +74,13 @@ function HeaderPage(props){
|
|||
// 专区简介
|
||||
data && (data.introductionTitle || data.introductionContent || data.introductionImage) &&
|
||||
<div className="boxmain zone_infos">
|
||||
<div className="zone_infos_desc">
|
||||
{data.introductionTitle && <p className="z_name">{data.introductionTitle}</p>}
|
||||
<p className="z_desc task-hide-2" style={{WebkitLineClamp:data.introductionTitle?"4":"7"}} dangerouslySetInnerHTML={{ __html: data.introductionContent }} ></p>
|
||||
</div>
|
||||
<div className="zone_infos_desc">
|
||||
{data.introductionTitle && <p className="z_name">{data.introductionTitle}</p>}
|
||||
<p className="z_desc task-hide-2" style={{WebkitLineClamp:data.introductionTitle?"4":"7"}} dangerouslySetInnerHTML={{ __html: data.introductionContent }} ></p>
|
||||
</div>
|
||||
{
|
||||
data.introductionImage &&
|
||||
<img src={data.introductionImage} alt="" height="277px"/>
|
||||
<img src={data.introductionImage} alt="" width="300px"/>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ function HeaderPageCCF(props) {
|
|||
</div>
|
||||
{
|
||||
data.introductionImage &&
|
||||
<img src={data.introductionImage} alt="" height="277px" />
|
||||
<img src={data.introductionImage} alt="" width="300px" />
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -770,7 +770,7 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 54px;
|
||||
padding:27px 24px;
|
||||
padding:40px 24px;
|
||||
&>img{
|
||||
border-radius: 4px;
|
||||
object-fit: contain;
|
||||
|
|
@ -783,7 +783,7 @@
|
|||
font-size:20px;
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
margin-bottom: 35px!important;
|
||||
margin-bottom: 30px!important;
|
||||
}
|
||||
.z_desc{
|
||||
color:#3d485d;
|
||||
|
|
@ -1787,10 +1787,13 @@
|
|||
line-height: 24px;
|
||||
margin-bottom: 15px!important;
|
||||
height: 48px;
|
||||
word-break: break-all;
|
||||
}
|
||||
.time{
|
||||
font-size: 14px;
|
||||
color: #5E6685;
|
||||
word-break: break-all;
|
||||
display: block;
|
||||
i{
|
||||
font-size: 14px!important;
|
||||
margin-right: 5px;
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ function CreateSite(props) {
|
|||
<Select.Option value={0}>hugo</Select.Option>
|
||||
<Select.Option value={1}>jekyll</Select.Option>
|
||||
<Select.Option value={2}>hexo</Select.Option>
|
||||
<Select.Option value={3}>files</Select.Option>
|
||||
</Select>
|
||||
)}
|
||||
<a className="ml20" href="https://help.gitlink.org.cn/%E4%B8%AA%E4%BA%BA%E4%B8%BB%E9%A1%B5%E5%BB%BA%E7%AB%99/%E5%BB%BA%E7%AB%99%E5%B7%A5%E5%85%B7" target="_blank">
|
||||
|
|
|
|||
|
|
@ -136,7 +136,8 @@ class Index extends Component {
|
|||
action: actionUrl || `${getUploadActionUrl()}`,
|
||||
onChange: this.handleChange,
|
||||
onRemove: this.onAttachmentRemove,
|
||||
beforeUpload: this.beforeUpload
|
||||
beforeUpload: this.beforeUpload,
|
||||
multiple:true
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
import fetch from './fetch';
|
||||
|
||||
// 当前glcc
|
||||
export const currentRound = 3;
|
||||
export const rewardMoney = "现金奖励"
|
||||
export const rewardSettingRound = 3;
|
||||
|
||||
// 获取当前用户项目报名信息(项目、课题)
|
||||
export function getUserApplyInfo(params) {
|
||||
return fetch({
|
||||
|
|
@ -281,6 +286,14 @@ export function formatParsedResult(setting, type= "range") {
|
|||
result= `${startYear}年${startMonth}月${startDay}日${startHour}点`;
|
||||
}else if(type === "end"){
|
||||
result= `${endYear}年${endMonth}月${endDay}日${endHour}点`;
|
||||
} else if(type === "rangeDay"){
|
||||
result = `${startYear}年${startMonth}月${startDay}日-${endYear}年${endMonth}月${endDay}日`;
|
||||
} else if(type === "startMonthDay"){
|
||||
result= `${startMonth}.${startDay}`;
|
||||
} else if(type === "endMonthDay"){
|
||||
result= `${endMonth}.${endDay}`;
|
||||
} else if(type === "rangeConcatDot"){
|
||||
result = `${startMonth}.${startDay}-${endMonth}.${endDay}`;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React , { useCallback, useEffect , useState } from 'react';
|
||||
import { Button, Form, Input, Select, Upload, message, Popconfirm } from 'antd';
|
||||
import { Button, Form, Input, Select, Upload, message, Popconfirm, Checkbox } from 'antd';
|
||||
import {getUploadActionUrl} from 'educoder';
|
||||
import {applyGlcc, findStudentTaskByTaskId, updateApplyGlcc} from '../api';
|
||||
import TextArea from 'antd/lib/input/TextArea';
|
||||
|
|
@ -10,10 +10,10 @@ import { FlexAJ } from '../../forge/Component/layout';
|
|||
const Option = Select.Option;
|
||||
// 编辑项目、课题报名信息
|
||||
function EditRepoApplyInfo(props) {
|
||||
const {form, applyInfo, current_user, round, cateList, setReload, isAddRepo, setIsAddRepo, setIsEdit, setEditRepoCount} = props;
|
||||
const {form, applyInfo, current_user, round, cateList, setReload, isAddRepo, setIsAddRepo, setIsEdit, setEditRepoCount, rewardList} = props;
|
||||
const phonereg = /(^|\s*\+?0?0?86|\D)(1\d{2})[-\s]{0,3}(\d{4})[-\s]{0,3}(\d{4})(?=\D|$)/
|
||||
const emailreg = /^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/
|
||||
const {getFieldDecorator, validateFields, setFieldsValue, validateFieldsAndScroll, getFieldValue } = form;
|
||||
const {getFieldDecorator, validateFields, setFieldsValue, validateFieldsAndScroll, getFieldValue, resetFields } = form;
|
||||
const [imageUrl, setImageUrl] = useState(undefined);
|
||||
// 提交按钮loading效果
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
|
@ -22,30 +22,41 @@ function EditRepoApplyInfo(props) {
|
|||
|
||||
useEffect(()=>{
|
||||
if(applyInfo){
|
||||
const {projectName, projectType, gitlinkUrl, contactName, contactPhone, projectIntro, registrationTaskList, projectLogoId, contactMail} = applyInfo;
|
||||
const {projectName, projectType, gitlinkUrl, contactName, contactPhone, projectIntro, registrationTaskList, projectLogoId, contactMail, joinCooperativeCommunity} = applyInfo;
|
||||
const taskInfo = {};
|
||||
const taskRewardRemark = {};
|
||||
const taskCountArr = []
|
||||
registrationTaskList.map((item, index)=>{
|
||||
taskCountArr.push(index+1);
|
||||
const{taskName, taskUrl, taskDifficulty, taskReward, tutorName, tutorMail, taskDesc, tutorPhone, id} = item;
|
||||
const{taskName, taskUrl, taskDifficulty, tutorName, tutorMail, taskDesc, tutorPhone, id, settingRewardId, settingRewardRemark, tutorAddress} = item;
|
||||
taskInfo[`taskName${index+1}`] = taskName;
|
||||
taskInfo[`taskUrl${index+1}`] = taskUrl;
|
||||
taskInfo[`taskDifficulty${index+1}`] = taskDifficulty;
|
||||
taskInfo[`taskReward${index+1}`] = taskReward;
|
||||
taskInfo[`tutorName${index+1}`] = tutorName;
|
||||
taskInfo[`tutorMail${index+1}`] = tutorMail;
|
||||
taskInfo[`taskDesc${index+1}`] = taskDesc;
|
||||
taskInfo[`tutorPhone${index+1}`] = tutorPhone;
|
||||
taskInfo[`tutorAddress${index+1}`] = tutorAddress;
|
||||
taskInfo[`taskId${index+1}`] = id;
|
||||
taskInfo[`settingRewardId${index+1}`] = parseInt(settingRewardId);
|
||||
// taskInfo[`settingRewardRemark${index+1}`] = settingRewardRemark;
|
||||
taskRewardRemark[`settingRewardRemark${index+1}`] = settingRewardRemark;
|
||||
})
|
||||
setTaskCount(taskCountArr);
|
||||
setTimeout(() => {
|
||||
setFieldsValue({
|
||||
projectName, projectType, gitlinkUrl, contactName, contactPhone, projectIntro, contactMail,
|
||||
...taskInfo,
|
||||
logo: {file:{response:{id: projectLogoId}}}
|
||||
logo: {file:{response:{id: projectLogoId}}},
|
||||
joinCooperativeCommunity,
|
||||
})
|
||||
}, 100);
|
||||
// 课题奖励备注要根据奖励方式注入select/input
|
||||
setTimeout(() => {
|
||||
setFieldsValue({
|
||||
...taskRewardRemark,
|
||||
})
|
||||
}, 300);
|
||||
}else{
|
||||
setTaskCount([1])
|
||||
}
|
||||
|
|
@ -81,17 +92,19 @@ function EditRepoApplyInfo(props) {
|
|||
taskName: values[`taskName${item}`],
|
||||
taskUrl: values[`taskUrl${item}`],
|
||||
taskDifficulty: values[`taskDifficulty${item}`],
|
||||
taskReward: values[`taskReward${item}`],
|
||||
settingRewardId: values[`settingRewardId${item}`],
|
||||
settingRewardRemark: values[`settingRewardRemark${item}`],
|
||||
tutorName: values[`tutorName${item}`],
|
||||
tutorMail: values[`tutorMail${item}`],
|
||||
tutorAddress: values[`tutorAddress${item}`],
|
||||
taskDesc: values[`taskDesc${item}`],
|
||||
tutorPhone: values[`tutorPhone${item}`],
|
||||
round
|
||||
})
|
||||
})
|
||||
const {projectName, projectType, gitlinkUrl, contactName, contactPhone, projectIntro, contactMail} = values;
|
||||
const {projectName, projectType, gitlinkUrl, contactName, contactPhone, projectIntro, contactMail, joinCooperativeCommunity=false} = values;
|
||||
const params ={
|
||||
projectName, projectType, gitlinkUrl, contactName, contactPhone, projectIntro, registrationTaskList, round, contactMail,
|
||||
projectName, projectType, gitlinkUrl, contactName, contactPhone, projectIntro, registrationTaskList, round, contactMail, joinCooperativeCommunity,
|
||||
projectLogoId: values.logo.file.response.id+"",
|
||||
userId: current_user.user_id,
|
||||
userName: current_user.username
|
||||
|
|
@ -101,27 +114,31 @@ function EditRepoApplyInfo(props) {
|
|||
// 用户已经报名项目
|
||||
params[`id`] = applyInfo.id;
|
||||
updateApplyGlcc(params).then(response=>{
|
||||
setLoading(false);
|
||||
if(response && response.message === "success"){
|
||||
message.success("修改成功");
|
||||
setReload();
|
||||
}
|
||||
setLoading(false);
|
||||
setIsEdit(false);
|
||||
setEditRepoCount(0);
|
||||
setTimeout(() => {
|
||||
scrollToRepoInfo()
|
||||
}, 100);
|
||||
}).catch(error=>{
|
||||
setLoading(false);
|
||||
})
|
||||
return
|
||||
}
|
||||
applyGlcc(params).then(response=>{
|
||||
setLoading(false);
|
||||
if(response && response.message === "success"){
|
||||
message.success("报名成功");
|
||||
isAddRepo && setIsAddRepo(false);
|
||||
setReload();
|
||||
}
|
||||
setLoading(false);
|
||||
window.scrollTo(0,950);
|
||||
}).catch(error=>{
|
||||
setLoading(false);
|
||||
})
|
||||
}
|
||||
});
|
||||
|
|
@ -221,7 +238,25 @@ function EditRepoApplyInfo(props) {
|
|||
{ max: 252, message: '超出限制长度252位字符,请重新编辑' }],
|
||||
<Input placeholder="请输入GitLink项目地址" onBlur={()=>{verify("gitlink")}}/>
|
||||
)}
|
||||
{helper('联系人姓名',
|
||||
<Form.Item label="联系人姓名">
|
||||
{getFieldDecorator("contactName", { rules: [{ required: true, message: "请输入项目联系人姓名" },
|
||||
{ max: 32, message: '超出限制长度32位字符,请重新编辑' }], validateFirst: true, initialValue: current_user.username })(
|
||||
<Input placeholder="请输入项目联系人姓名" onBlur={()=>{verify("name")}}/>
|
||||
)}
|
||||
</Form.Item>
|
||||
<Form.Item label="联系人电话">
|
||||
{getFieldDecorator("contactPhone", { rules: [{ required: true, message: "输入项目联系人手机号码" },
|
||||
{ pattern: phonereg, message: "请输入正确的手机号码"},], validateFirst: true, initialValue: current_user.phone })(
|
||||
<Input placeholder="输入项目联系人手机号码" onBlur={()=>{verify("name")}}/>
|
||||
)}
|
||||
</Form.Item>
|
||||
<Form.Item label="联系人邮箱">
|
||||
{getFieldDecorator("contactMail", { rules: [{ required: true, message: "输入项目联系人邮箱" },
|
||||
{ pattern: emailreg, message: "请输入正确的邮箱地址"},], validateFirst: true, initialValue: current_user.email })(
|
||||
<Input placeholder="输入项目联系人邮箱" onBlur={()=>{verify("name")}}/>
|
||||
)}
|
||||
</Form.Item>
|
||||
{/* {helper('联系人姓名',
|
||||
'',
|
||||
'contactName',
|
||||
[{ required: true, message: "请输入项目联系人姓名" },
|
||||
|
|
@ -241,7 +276,7 @@ function EditRepoApplyInfo(props) {
|
|||
[{ required: true, message: "输入项目联系人邮箱" },
|
||||
{ pattern: emailreg, message: "请输入正确的邮箱地址"},],
|
||||
<Input placeholder="输入项目联系人邮箱" onBlur={()=>{verify("name")}}/>
|
||||
)}
|
||||
)} */}
|
||||
<div className='introArea'>{helper('项目简介',
|
||||
'',
|
||||
'projectIntro',
|
||||
|
|
@ -268,13 +303,20 @@ function EditRepoApplyInfo(props) {
|
|||
</div>}
|
||||
</Upload>
|
||||
)}</div>
|
||||
<div className='introArea' style={{paddingLeft: '128px'}}>
|
||||
<Form.Item>
|
||||
{getFieldDecorator("joinCooperativeCommunity", { rules: [], validateFirst: true, valuePropName: "checked" })(
|
||||
<Checkbox>授权将社区加入合作社区名单,项目logo可用于GLCC网站和海报宣传</Checkbox>
|
||||
)}
|
||||
</Form.Item>
|
||||
</div>
|
||||
{taskCount.map((item, index)=>{
|
||||
return <div className='taskApplyBox' key={item}>
|
||||
<FlexAJ className='taskApplyTitleBox'>
|
||||
<div className='taskApplyTitle font-16'>课题信息(<span>{index+1}</span>/5)</div>
|
||||
{index>0 && <Button type="link" onClick={()=>{deleteTaskApply(item)}}><i className='iconfont icon-shanchuicon3 mr5 font-15'></i>删除</Button>}
|
||||
</FlexAJ>
|
||||
<TaskApply helper={helper} taskKey={item} phonereg={phonereg} emailreg={emailreg} getFieldDecorator={getFieldDecorator}/>
|
||||
<TaskApply helper={helper} taskKey={item} phonereg={phonereg} emailreg={emailreg} getFieldDecorator={getFieldDecorator} rewardList={rewardList} getFieldValue={getFieldValue} resetFields={resetFields}/>
|
||||
</div>
|
||||
})}
|
||||
{taskCount && taskCount.length<5 && <div>
|
||||
|
|
@ -282,7 +324,7 @@ function EditRepoApplyInfo(props) {
|
|||
</div>}
|
||||
<Form.Item className='subInfo introArea'>
|
||||
{(isAddRepo || applyInfo) && <Popconfirm
|
||||
title={<span>取消编辑将清除已填写的所有项目信息,请谨慎操作</span>}
|
||||
title={<span>取消将不保存所有修改,请谨慎操作</span>}
|
||||
onConfirm={cancelEdit}
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React , { useEffect , useState } from 'react';
|
||||
import { Breadcrumb, message } from 'antd';
|
||||
import {getUserApplyInfo} from '../api';
|
||||
import {getUserApplyInfo, getGlccSettings, currentRound, formatParsedResult} from '../api';
|
||||
import axios from 'axios';
|
||||
import RepoInfo from './repoInfo';
|
||||
import EditInfo from './editInfo';
|
||||
|
|
@ -10,7 +10,7 @@ import './index.scss';
|
|||
import { FlexAJ } from '../../forge/Component/layout';
|
||||
// 项目、课题报名
|
||||
function Apply(props) {
|
||||
const {current_user, round} = props;
|
||||
const {current_user, round, glccSettings} = props;
|
||||
const [reload, setReload] = useState(undefined);
|
||||
const [cateList, setCateList] = useState([]);
|
||||
const [userApplyInfo, setUserApplyInfo] = useState([]);
|
||||
|
|
@ -18,6 +18,9 @@ function Apply(props) {
|
|||
const [isAddRepo, setIsAddRepo] = useState(false);
|
||||
// 编辑项目个数
|
||||
const [editRepoCount, setEditRepoCount] = useState(0);
|
||||
// 课题奖励-后台配置
|
||||
const [rewardList, setRewardList] = useState([]);
|
||||
const applyTime = glccSettings && glccSettings.filter(item=>item.name === "repoApply");
|
||||
|
||||
useEffect(()=>{
|
||||
// 进入此页面置顶
|
||||
|
|
@ -30,6 +33,12 @@ function Apply(props) {
|
|||
setCateList(result.data.project_categories);
|
||||
}
|
||||
}).catch(error=>{})
|
||||
// 获取课题奖励分类
|
||||
getGlccSettings({round: currentRound, type: "rewardSetting"}).then(res=>{
|
||||
if(res && res.data){
|
||||
setRewardList(res.data);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
window.location.href="/login?go_page=/glcc/apply";
|
||||
}
|
||||
|
|
@ -74,20 +83,21 @@ function Apply(props) {
|
|||
{userApplyInfo.length > 0 && <div className='applySuccess mt20 font-15'>您已报名成功,可实时修改您的报名信息再次提交。请关注夏令营首页新闻公告获得更多活动资讯!</div>}
|
||||
<div className={`explain`}>
|
||||
<p className='font-15 c000'>申请说明</p>
|
||||
<div>1、项目报名时间为<span className='c000'>4月29日—5月30日</span>,请在报名截止时间(北京时间<span className='c000'>2023年5月30日24点</span>)前提交报名信息。</div>
|
||||
<div>2、本次GLCC夏令营建议使用GitLink为代码托管平台,学生基于GitLink上项目完成编程任务。同时也欢迎使用其他代码托管平台的项目参与活动。目前GLCC只对夏令营期间使用GitLink托管的项目提供部分奖金支持。</div>
|
||||
<div>3、如果您的项目还未迁移到GitLink上,迁移事项请查看<a href='https://forum.gitlink.org.cn/forums/7296/detail' target="_blank" className='link'>迁移说明文档</a>。如在迁移过程中遇到问题,请加qq群: 1071514693 联系qq群管理员。</div>
|
||||
<div>1、项目报名时间为<span className='c000'>{formatParsedResult(applyTime, "rangeDay")}</span>,请在报名截止时间(北京时间<span className='c000'>{formatParsedResult(applyTime, "end")}</span>)前提交报名信息。</div>
|
||||
<div>2、本次GLCC夏令营建议使用GitLink为代码托管平台,学生基于GitLink上项目完成编程任务。同时也欢迎使用其他代码托管平台的项目参与活动。目前GLCC只对夏令营期间使用GitLink托管的项目提供部分奖励支持。</div>
|
||||
<div>3、如果您的项目还未迁移到GitLink上,迁移事项请查看<a href='https://help.gitlink.org.cn/%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B/%E5%AF%BC%E5%85%A5GitHub%E7%AD%89%E7%AC%AC%E4%B8%89%E6%96%B9Git%E9%A1%B9%E7%9B%AE?_highlight=%E5%AF%BC%E5%85%A5' target="_blank" className='link'>迁移说明文档</a>。如在迁移过程中遇到问题,请加qq群: 1071514693 联系qq群管理员。</div>
|
||||
<div>4、提交社区和题目信息后,欢迎与组委会联系沟通宣传推广和后续合作工作。联系人微信: _TigerWang(备注GitLink编程夏令营)</div>
|
||||
<div><span className='c000'>5、奖金默认由项目方支持,请根据课题难度设定金额。若您可能无法支撑本课题奖金,GLCC组委会将进行资助评审,择优资助。如未获得资助,将下线该课题</span></div>
|
||||
<div>5、在项目报名期间({formatParsedResult(applyTime, "rangeDay")}),您可以随时进入当前页调整项目或课题报名信息</div>
|
||||
<div><span className='c000'>6、课题奖励默认由项目方支持,可提供现金或者实习机会等其他形式的奖励,请根据课题难度设定奖励内容。若您可能无法支撑本课题奖励,GLCC组委会将进行资助评审,择优资助。如未获得资助,将下线该课题</span></div>
|
||||
</div>
|
||||
<FlexAJ className='pt20 font-18 pb20'>
|
||||
<span><img src={apply1} alt="" width="25px" className="mr10"/>项目报名</span>
|
||||
{userApplyInfo.length > 0 && <a className='font-16 addRepoBut' onClick={addRepoBut}><i className='iconfont icon-tianjia_tianchong mr5 font-22'></i>添加项目</a>}
|
||||
</FlexAJ>
|
||||
{userApplyInfo.length > 0 && <div className='repoListBox'>
|
||||
{userApplyInfo.map((item, index)=><div className='repoList mb20' key={index}><RepoInfo cateList={cateList} applyInfo={item} current_user={current_user} round={round} setReload={()=>{setReload(Math.random())}} isAddRepo={isAddRepo} editRepoCount={editRepoCount} setEditRepoCount={setEditRepoCount} repoCount={userApplyInfo.length} scrollToEdit={scrollToEdit}/></div>)}
|
||||
{userApplyInfo.map((item, index)=><div className='repoList mb20' key={index}><RepoInfo cateList={cateList} applyInfo={item} current_user={current_user} round={round} setReload={()=>{setReload(Math.random())}} isAddRepo={isAddRepo} editRepoCount={editRepoCount} setEditRepoCount={setEditRepoCount} repoCount={userApplyInfo.length} scrollToEdit={scrollToEdit} rewardList={rewardList}/></div>)}
|
||||
</div>}
|
||||
{(!userApplyInfo.length || isAddRepo) && <EditInfo isAddRepo={isAddRepo} setIsAddRepo={setIsAddRepo} round={round} cateList={cateList} current_user={current_user} setReload={()=>{setReload(Math.random())}}/>}
|
||||
{(!userApplyInfo.length || isAddRepo) && <EditInfo isAddRepo={isAddRepo} setIsAddRepo={setIsAddRepo} round={round} cateList={cateList} current_user={current_user} setReload={()=>{setReload(Math.random())}} rewardList={rewardList}/>}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import EditInfo from "./editInfo";
|
|||
import { FlexAJ } from "../../forge/Component/layout";
|
||||
import { main_site_url } from "../fetch";
|
||||
import './index.scss';
|
||||
import { deleteApplyInfo } from "../api";
|
||||
import { deleteApplyInfo, rewardMoney } from "../api";
|
||||
// 项目、课题信息展示
|
||||
function RepoInfo(props) {
|
||||
const {applyInfo:{id, projectLogoId, projectName, projectType, contactName, contactPhone, contactMail, gitlinkUrl, projectIntro, registrationTaskList}, setReload, editRepoCount, setEditRepoCount, repoCount, isAddRepo, scrollToEdit} = props;
|
||||
|
|
@ -34,20 +34,21 @@ function RepoInfo(props) {
|
|||
|
||||
// 课题信息展示
|
||||
const showTask = (task) => {
|
||||
const {id, taskDifficulty, taskName, taskReward, tutorName, tutorPhone, tutorMail, taskDesc, taskUrl} = task;
|
||||
const {id, taskDifficulty, taskName, taskReward, tutorName, tutorPhone, tutorMail, taskDesc, taskUrl, settingRewardValue, settingRewardRemark} = task;
|
||||
return <div className="taskApplyInfo mt20" key={id}>
|
||||
<FlexAJ>
|
||||
<div>
|
||||
<div className={`taskDifficulty diff${taskDifficulty} font-14 mr10`}>{difficultyList[taskDifficulty]}</div>
|
||||
<span className="repoName font-16">{taskName}</span>
|
||||
</div>
|
||||
<span className="font-20 taskRewardBox">¥ {taskReward}</span>
|
||||
<span className="font-20 taskRewardBox">{settingRewardValue === rewardMoney ? `¥ ${settingRewardRemark}` : settingRewardValue}</span>
|
||||
</FlexAJ>
|
||||
<div style={{flex: 1}} className="font-15 ml35 mt10">
|
||||
<Row gutter={16}>
|
||||
<Col span={12}><div className="repoOthersInfo"><span className="labelInfoBox">导师信息:</span>{tutorName}({tutorPhone} | {tutorMail})</div></Col>
|
||||
<Col span={12}><div className="repoOthersInfo"><span className="labelInfoBox">课题链接:</span>{taskUrl}</div></Col>
|
||||
</Row>
|
||||
{settingRewardValue !== rewardMoney && <div className="repoOthersInfo mt10"><span className="labelInfoBox">奖励备注:</span>{settingRewardRemark}</div>}
|
||||
<div className="repoOthersInfo mt10"><span className="labelInfoBox">课题简介:</span>{taskDesc}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,27 +1,27 @@
|
|||
import React from 'react';
|
||||
import {Form, Input, Select } from 'antd';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import {Form, Input, Radio, Select } from 'antd';
|
||||
import TextArea from 'antd/lib/input/TextArea';
|
||||
import { rewardMoney } from '../api';
|
||||
const Option = Select.Option;
|
||||
// 课题信息编辑
|
||||
function TaskApply(props) {
|
||||
const {helper, disabled, taskKey, phonereg, emailreg, getFieldDecorator} = props;
|
||||
const {helper, disabled, taskKey, phonereg, emailreg, getFieldDecorator, rewardList, getFieldValue, resetFields} = props;
|
||||
// 低、中、高
|
||||
const difficultyList = [
|
||||
{id: 1, name: "低"},
|
||||
{id: 2, name: "中"},
|
||||
{id: 3, name: "高"}
|
||||
]
|
||||
// 奖金
|
||||
const rewardList = [
|
||||
{id: 12000},
|
||||
{id: 11000},
|
||||
{id: 10000},
|
||||
{id: 9000},
|
||||
{id: 8000},
|
||||
{id: 7000},
|
||||
{id: 6000},
|
||||
{id: 0},
|
||||
]
|
||||
// 奖金数额
|
||||
const amountList = [12000, 11000, 10000, 9000, 8000, 7000, 6000]
|
||||
const disabledProps = {
|
||||
disabled: disabled,
|
||||
className: disabled? "disabledInput":""
|
||||
}
|
||||
// 选中的奖励方式
|
||||
const rewardId = getFieldValue(`settingRewardId${taskKey}`);
|
||||
const rewardItem = rewardId && rewardList && rewardList.filter(item=>item.id === rewardId);
|
||||
const rewardName = rewardItem && rewardItem[0] && rewardItem[0].value;
|
||||
|
||||
return(
|
||||
<div className="taskApplyForm">
|
||||
|
|
@ -34,67 +34,95 @@ function TaskApply(props) {
|
|||
`taskName${taskKey}`,
|
||||
[{ required: true, message: "请输入课题名称,长度限制32个字符" },
|
||||
{ max: 32, message: '超出限制长度32位字符,请重新编辑' }],
|
||||
<Input placeholder="请输入课题名称" disabled = {disabled} className={disabled? "disabledInput":""}/>
|
||||
<Input placeholder="请输入课题名称" {...disabledProps}/>
|
||||
)}
|
||||
{helper('课题链接',
|
||||
'',
|
||||
`taskUrl${taskKey}`,
|
||||
[{ required: true, message: "请输入课题链接" },
|
||||
{ max: 252, message: '超出限制长度252位字符,请重新编辑' }],
|
||||
<Input placeholder="请输入课题链接" disabled = {disabled} className={disabled? "disabledInput":""}/>
|
||||
<Input placeholder="请输入课题链接" {...disabledProps}/>
|
||||
)}
|
||||
{helper('课题难度',
|
||||
'',
|
||||
`taskDifficulty${taskKey}`,
|
||||
[{ required: true, message: "请选择课题难度" }],
|
||||
<Select placeholder="请选择课题难度" disabled = {disabled} className={disabled? "disabledInput":""}>
|
||||
<Select placeholder="请选择课题难度" {...disabledProps}>
|
||||
{difficultyList && difficultyList.map(item=> {return <Option value={item.id} key={item.id}>{item.name}</Option>})}
|
||||
</Select>
|
||||
)}
|
||||
{helper('课题奖金',
|
||||
'',
|
||||
`taskReward${taskKey}`,
|
||||
[{ required: true, message: "请选择课题奖金" },
|
||||
// {pattern: /^[1-9]+[0-9]*]*$/, message: "请输入正整数" },
|
||||
// { validator: (rule,val,callback) =>{
|
||||
// if(val>=6000 && val<=12000){
|
||||
// callback();
|
||||
// }else{
|
||||
// callback("区间为6000-12000元");
|
||||
// }
|
||||
// }}
|
||||
],
|
||||
<Select placeholder="请根据课题难度选择奖金" disabled = {disabled} className={disabled? "disabledInput":""}>
|
||||
{rewardList && rewardList.map(item=> {return <Option value={item.id} key={item.id}>{item.id}</Option>})}
|
||||
</Select>
|
||||
)}
|
||||
<div className='introArea'>
|
||||
{helper('课题奖励',
|
||||
'',
|
||||
`settingRewardId${taskKey}`,
|
||||
[{ required: true, message: "请选择课题奖励" },
|
||||
],
|
||||
<Radio.Group {...disabledProps} onChange={()=>{
|
||||
resetFields([`settingRewardRemark${taskKey}`]);
|
||||
}}>
|
||||
{rewardList && rewardList.map(item=> {return <Radio value={item.id} key={item.id}>{item.value}</Radio>})}
|
||||
</Radio.Group>
|
||||
)}
|
||||
</div>
|
||||
{/* <Form.Item label={rewardName === rewardMoney ? "奖金数额": "奖励备注"}>
|
||||
{getFieldDecorator(`settingRewardRemark${taskKey}`, {
|
||||
initialValue: '1233',
|
||||
rules: rewardName === rewardMoney ? [{ required: true, message: "请选择课题奖金" }] : []
|
||||
})(rewardName === rewardMoney ? <Select placeholder="请根据课题难度选择奖金" {...disabledProps}>
|
||||
{amountList.map(item=> {return <Option value={item} key={item}>{item}</Option>})}
|
||||
</Select> : <Input maxLength={200} placeholder="请填写您可以提供的奖励方式,并详细描述奖励内容,例如可以提供2025年2月-6月,xxx部门的后端开发实习岗位" {...disabledProps}/>)}
|
||||
</Form.Item> */}
|
||||
{rewardName && <div className='introArea'>
|
||||
{helper(rewardName === rewardMoney ? "奖金数额": "奖励备注",
|
||||
'',
|
||||
`settingRewardRemark${taskKey}`,
|
||||
rewardName === rewardMoney ? [{ required: true, message: "请选择课题奖金" }] : [],
|
||||
rewardName === rewardMoney ? <Select placeholder="请根据课题难度选择奖金" {...disabledProps}>
|
||||
{amountList.map(item=> {return <Option value={item} key={item}>{item}</Option>})}
|
||||
</Select> : <Input maxLength={200} placeholder="请填写您可以提供的奖励方式,并详细描述奖励内容,例如可以提供2025年2月-6月,xxx部门的后端开发实习岗位" {...disabledProps}/>
|
||||
)}
|
||||
</div>}
|
||||
{/* {helper(rewardName === rewardMoney ? "奖金数额": "奖励备注",
|
||||
'',
|
||||
`settingRewardRemark${taskKey}`,
|
||||
rewardName === rewardMoney ? [{ required: true, message: "请选择课题奖金" }] : [],
|
||||
rewardName === rewardMoney ? <Select placeholder="请根据课题难度选择奖金" {...disabledProps}>
|
||||
{amountList.map(item=> {return <Option value={item} key={item}>{item}</Option>})}
|
||||
</Select> : <Input maxLength={200} placeholder="请填写您可以提供的奖励方式,并详细描述奖励内容,例如可以提供2025年2月-6月,xxx部门的后端开发实习岗位" {...disabledProps}/>
|
||||
)} */}
|
||||
{helper('导师姓名',
|
||||
'',
|
||||
`tutorName${taskKey}`,
|
||||
[{ required: true, message: "请输入导师姓名" },
|
||||
{ max: 32, message: '超出限制长度32位字符,请重新编辑' }],
|
||||
<Input placeholder="请输入导师姓名" disabled = {disabled} className={disabled? "disabledInput":""}/>
|
||||
<Input placeholder="请输入导师姓名" {...disabledProps}/>
|
||||
)}
|
||||
{helper('导师手机号',
|
||||
'',
|
||||
`tutorPhone${taskKey}`,
|
||||
[{ required: true, message: "请输入导师手机号" },
|
||||
{ pattern: phonereg, message: "请输入正确的电话号码"},],
|
||||
<Input placeholder="请输入导师手机号" disabled = {disabled} className={disabled? "disabledInput":""}/>
|
||||
<Input placeholder="请输入导师手机号" {...disabledProps}/>
|
||||
)}
|
||||
{helper('导师邮箱',
|
||||
'',
|
||||
`tutorMail${taskKey}`,
|
||||
[{ required: true, message: "请输入导师邮箱地址" },
|
||||
{ pattern: emailreg, message: "请输入正确的邮箱地址"},],
|
||||
<Input placeholder="请输入导师邮箱地址" disabled = {disabled} className={disabled? "disabledInput":""}/>
|
||||
<Input placeholder="请输入导师邮箱地址" {...disabledProps}/>
|
||||
)}
|
||||
{helper('导师邮寄地址',
|
||||
'',
|
||||
`tutorAddress${taskKey}`,
|
||||
[{ required: true, message: "请输入导师地址" }],
|
||||
<Input maxLength={200} placeholder="请输入导师邮寄地址,仅用于后续奖品邮寄" {...disabledProps}/>
|
||||
)}
|
||||
<div className='introArea'>{helper('课题简介',
|
||||
'',
|
||||
`taskDesc${taskKey}`,
|
||||
[{ required: true, message: "请输入课题简介" },
|
||||
{ max: 200, message: '超出限制长度200位字符,请重新编辑' }],
|
||||
<TextArea placeholder="请输入课题简介" rows={4} disabled = {disabled} className={disabled? "disabledInput":""}/>
|
||||
<TextArea placeholder="请输入课题简介" rows={4} {...disabledProps}/>
|
||||
)}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@
|
|||
}
|
||||
// 项目详情框
|
||||
.projectDetailBox{
|
||||
word-break: break-all;
|
||||
&.byTask{
|
||||
background-image:linear-gradient(180deg,#f1f5ff 0%,#ffffff 100%);
|
||||
border:1px solid #ffffff;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||
import './index.scss';
|
||||
|
||||
|
||||
function Award() {
|
||||
function Award({round}) {
|
||||
|
||||
return (
|
||||
<div className="award">
|
||||
|
|
@ -21,14 +21,14 @@ function Award() {
|
|||
</div>
|
||||
|
||||
<div className="award-item">
|
||||
<div className="award-tit">毕业证书或奖杯</div>
|
||||
<div className="award-content">通过结项考核的学生获得毕业证书,优秀同学还可获得单项奖奖杯</div>
|
||||
<div className="award-tit">{round === 3 ? "荣誉证书或奖杯" : "毕业证书或奖杯"}</div>
|
||||
<div className="award-content">{round === 3 ? "通过结项考核的学生获得夏令营毕业证书。优秀同学还可获得开源之星等单项奖杯,项目及导师将有机会评选优秀社区、明星导师等奖项" : "通过结项考核的学生获得毕业证书,优秀同学还可获得单项奖奖杯"}</div>
|
||||
<div className="award-line"></div>
|
||||
</div>
|
||||
|
||||
<div className="award-item">
|
||||
<div className="award-tit">夏令营大礼包</div>
|
||||
<div className="award-content">夏令营纪念文化衫、帆布包、鼠标垫,开源系列图书,社区周边等。此外,还会评选出若干优秀社区、明星导师、最佳课题、开源之星等单项奖</div>
|
||||
<div className="award-content">{round === 3 ? "所有入选学生将领取到夏令营纪念文化衫、帆布包、鼠标垫,开源系列图书,社区周边等" : "夏令营纪念文化衫、帆布包、鼠标垫,开源系列图书,社区周边等。此外,还会评选出若干优秀社区、明星导师、最佳课题、开源之星等单项奖"}</div>
|
||||
<div className="award-line"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useEffect, useState } from "react";
|
||||
import React, { Fragment, useEffect, useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
// import Banner from "./banner";
|
||||
import Lightspot from './lightspot';
|
||||
|
|
@ -7,7 +7,9 @@ import Award from "./award";
|
|||
import News from './news';
|
||||
import Partner from "./partner";
|
||||
import Contact from "./contact";
|
||||
import PreviousReview from './previousReview';
|
||||
import banner from "../img/banner.png";
|
||||
import banner2024 from "../img/banner2024.jpg";
|
||||
import introduce from "../img/introduce.png";
|
||||
import apply1 from "../img/apply1.png";
|
||||
import apply2 from "../img/apply2.png";
|
||||
|
|
@ -15,14 +17,14 @@ import img1 from "../img/img1.png";
|
|||
import img2 from "../img/img2.png";
|
||||
import teacher from "../img/teacher.png";
|
||||
import logo from "../img/openmmlab/logo1.png";
|
||||
import { hasAuditRole } from '../api';
|
||||
import { currentRound, hasAuditRole } from '../api';
|
||||
import './index.scss';
|
||||
|
||||
// round:2022届(1) 2023届(2)
|
||||
// period: 项目报名阶段("repoApply")
|
||||
// match:{params:{id=2023}} 注意默认值记得每届修改
|
||||
export default (props) => {
|
||||
const { current_user, history, round, match:{params:{id=2023}}, period, showLoginDialog, glccSettings, repoPublic, showMatchingBut, isResultPublic, hasRole, isMediumExamineByToTutor, isFinalExamineByToTutor, checkedTaskId} = props;
|
||||
const { current_user, history, round, match:{params:{id=2024}}, period, showLoginDialog, glccSettings, repoPublic, showMatchingBut, isResultPublic, hasRole, isMediumExamineByToTutor, isFinalExamineByToTutor, checkedTaskId} = props;
|
||||
useEffect(() => {
|
||||
if (!current_user.user_id) {
|
||||
history.push('/403');
|
||||
|
|
@ -40,16 +42,9 @@ export default (props) => {
|
|||
|
||||
return (
|
||||
<div className="glcc">
|
||||
{/* <Banner /> */}
|
||||
<img className="glcc-banner" src={banner} alt=""></img>
|
||||
{/* <div > */}
|
||||
{/* <Link className="apply-btn" to={isGlccApplyDate ? current_user && current_user.login ? 'https://wj.qq.com/s2/10175205/e8df/' : '/login?go_page=/glcc/apply' : '/glcc'} onClick={()=>{!isGlccApplyDate && showNotification("不在报名时间,报名时间为4月15日~5月20日")}}> */}
|
||||
{/* <div className="apply-btn" onClick={goToApply}>
|
||||
<div className="apply-text">立即报名</div>
|
||||
<div className="apply-icon"><i className="font-14 iconfont icon-xiangyoujiantou "></i></div>
|
||||
</div> */}
|
||||
<img className="glcc-banner" src={round !== currentRound ? banner : banner2024} alt=""></img>
|
||||
{/* 往期回顾 */}
|
||||
{round !== 2 && <div className="applyBox">
|
||||
{round !== currentRound ? <div className="applyBox">
|
||||
<Link className="apply" to={`/glcc/${id}/result`}>
|
||||
<div>
|
||||
<img src={img1} alt="" className="applyIcon" />
|
||||
|
|
@ -64,10 +59,8 @@ export default (props) => {
|
|||
</div>
|
||||
<div className="pt6">掌握项目课题详细信息</div>
|
||||
</Link>
|
||||
</div>}
|
||||
{/* 当前glcc */}
|
||||
{round === 2 && <div className="applyBox">
|
||||
{/* 项目报名入口 */}
|
||||
</div> : <div className="applyBox">
|
||||
{/* 当前glcc:项目报名入口 */}
|
||||
{period === "repoApply" && <a onClick={()=>{gotoCheckLogin(`/glcc/apply`)}} className="apply project" >
|
||||
<div>
|
||||
<img src={apply1} alt="" className="applyIcon" />
|
||||
|
|
@ -81,7 +74,7 @@ export default (props) => {
|
|||
{repoPublic && <Link to={`/glcc/${id}/projects`} className="apply project" >
|
||||
<div>
|
||||
<img src={apply1} alt="" className="applyIcon" />
|
||||
<span className="hover-none"><span className="til">有奖金项目</span> </span>
|
||||
<span className="hover-none"><span className="til">查看项目</span> </span>
|
||||
</div>
|
||||
<div className="pt6">掌握项目课题详细信息</div>
|
||||
</Link>}
|
||||
|
|
@ -103,13 +96,13 @@ export default (props) => {
|
|||
<div className="pt6">欢迎广大学生踊跃参与</div>
|
||||
</Link> */}
|
||||
{/* 无奖金课题结果公示 */}
|
||||
<Link to={`/glcc/${id}/free-result`} className="apply project" >
|
||||
{/* <Link to={`/glcc/${id}/free-result`} className="apply project" >
|
||||
<div>
|
||||
<img src={apply1} alt="" className="applyIcon" />
|
||||
<span className="hover-none"><span className="til">无奖金课题结果</span> </span>
|
||||
</div>
|
||||
<div className="pt6">面向无奖金课题学员考核结果公示</div>
|
||||
</Link>
|
||||
</Link> */}
|
||||
|
||||
{/* 学生报名6.24结束第一次报名,6.29 1:00 - 6.30 24:00第二次报名 */}
|
||||
{(period === "stuApply" || period === "stuApply1") && <div className="apply" onClick={()=>{gotoCheckLogin(`/glcc/${id}/subjects`)}}>
|
||||
|
|
@ -204,10 +197,12 @@ export default (props) => {
|
|||
</div>}
|
||||
</div>
|
||||
</div>
|
||||
<Lightspot id={id} period={period} history={history} current_user={current_user} round={round} showLoginDialog={showLoginDialog}/>
|
||||
<TimerShaft round={round} glccSettings={glccSettings}/>
|
||||
<Award />
|
||||
<News />
|
||||
{round === currentRound ? <Fragment>
|
||||
<Lightspot/>
|
||||
<TimerShaft id={id} period={period} history={history} current_user={current_user} showLoginDialog={showLoginDialog} glccSettings={glccSettings}/>
|
||||
</Fragment> : <PreviousReview round={round}/>}
|
||||
<Award round={round}/>
|
||||
<News round={round}/>
|
||||
<Partner round={round}/>
|
||||
<Contact />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import React, { Fragment } from 'react';
|
||||
import lightspot1 from '../../img/lightspot1.png';
|
||||
import lightspot2 from '../../img/lightspot2.png';
|
||||
import lightspot3 from '../../img/lightspot3.png';
|
||||
|
|
@ -6,36 +6,12 @@ import lightspot4 from '../../img/lightspot4.png';
|
|||
import './index.scss';
|
||||
|
||||
|
||||
function Lightspot(props) {
|
||||
const {current_user, period, history, round, showLoginDialog, id} = props;
|
||||
|
||||
function goToApply(){
|
||||
const url = period === "repoApply" ? `/glcc/apply` : `/glcc/${id}/subjects`;
|
||||
if(current_user && !current_user.login){
|
||||
showLoginDialog(url);
|
||||
return;
|
||||
}
|
||||
history.push(url);
|
||||
}
|
||||
|
||||
function Lightspot() {
|
||||
return (
|
||||
<div className="lightspot">
|
||||
<div className="glcc-content">
|
||||
<h3 className="glcc-tit">活动亮点</h3>
|
||||
<div className="lightspot-content">
|
||||
<div className="info-teacher">
|
||||
<div className="teacher-text">
|
||||
<h3 className="teacher-invite">有兴趣成为GLCC的导师吗?</h3>
|
||||
<div className="teacher-content">想要扩大项目知名度和影响力,为开源项目吸引新鲜血液,培养长期开发者。通过GitLink平台,与高校建立连接,指导开源新人传授他们的开源文化,享受开源的乐趣</div>
|
||||
{period === "repoApply" && round === 2 ? <div className='applyBut' onClick={goToApply}>立即报名</div> : <div className='applyBut project'><span className='hover-none'>项目报名</span><span className='hover-show'>已结束</span></div>}
|
||||
</div>
|
||||
<div className="teacher-text">
|
||||
<h3 className="teacher-invite">你是开源新手,有兴趣参加GLCC吗?</h3>
|
||||
<div className="teacher-content">想要参与一线开源项目开发,熟悉开源社区运作流程,接受资深开源软件专家指导,获得丰厚奖金和实习机会。参加GLCC,开启全新的开源之旅。</div>
|
||||
{(period === "stuApply" || period === "stuApply1") && round === 2 ? <div className='applyBut' onClick={goToApply}>学生报名</div> : <div className='applyBut project'><span className='hover-none'>学生报名</span><span className='hover-show'>{period === "repoApply" && round === 2 ? "敬请期待" : "已结束"}</span></div>}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="info-student">
|
||||
<div className="info-item">
|
||||
<img className="info-item-img" src={lightspot1} alt=''></img>
|
||||
|
|
@ -60,11 +36,7 @@ function Lightspot(props) {
|
|||
<h3 className="info-item-tit">丰厚奖励&实习绿色通道</h3>
|
||||
<div className="info-item-content">入选同学可获得丰厚奖金,并有机会进入优秀开源项目企业实习或工作,受邀参与开源大会等机会</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
.lightspot {
|
||||
background: url("../../img/lightspot-bg.png");
|
||||
background-size: 100% 100%;
|
||||
height: 44.6875vw;
|
||||
min-height: 858px;
|
||||
min-height: 620px;
|
||||
|
||||
.glcc-content{
|
||||
padding-top:55px;
|
||||
|
|
|
|||
|
|
@ -2,11 +2,13 @@ import React, { useEffect, useState } from 'react';
|
|||
import { Button, Col, Row } from 'antd';
|
||||
import axios from 'axios';
|
||||
import './index.scss';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { currentRound } from '../../api';
|
||||
|
||||
|
||||
function News() {
|
||||
|
||||
function News({round}) {
|
||||
const [list, setList] = useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
const url = `/topics.json?topic_type=glcc_news&limit=5`;
|
||||
axios.get(url).then(result => {
|
||||
|
|
@ -20,6 +22,9 @@ function News() {
|
|||
<div className="news">
|
||||
<div className="glcc-content">
|
||||
<h3 className="glcc-tit">新闻中心</h3>
|
||||
{round === currentRound && <div className='moreNews mb10'>
|
||||
<Link to={`/glcc/news`}>查看更多 <i className='icon-gengduo iconfont font-12'></i></Link>
|
||||
</div>}
|
||||
<div className="news-content">
|
||||
|
||||
{list.length ? <div className="main-news">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
.news {
|
||||
min-height: 529px;
|
||||
min-height: 570px;
|
||||
background-image: linear-gradient(180deg, #d6e6ff 0%, #f9fbff 100%);
|
||||
|
||||
.ant-btn-link {
|
||||
|
|
@ -81,4 +81,10 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.moreNews{
|
||||
text-align: right;
|
||||
&>a{
|
||||
color: $primary-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ import log63 from '../../img/63@2x.png';
|
|||
import log65 from '../../img/65@2x.png';
|
||||
import log67 from '../../img/67@2x.png';
|
||||
import log69 from '../../img/69@2x.png';
|
||||
import log71 from '../../img/70.png';
|
||||
import log70 from '../../img/浙江大学.png';
|
||||
import logo1 from '../../img/logo1.png';
|
||||
import logo2 from '../../img/logo2.png';
|
||||
|
|
@ -44,6 +45,26 @@ function Partner({round}) {
|
|||
<div className="partner">
|
||||
<div className="glcc-content">
|
||||
<h3 className="glcc-tit">组织方及合作伙伴</h3>
|
||||
{round === 3 && <div className='cont1 cont mb10'>
|
||||
<div>
|
||||
主办方
|
||||
<div onClick={() => { window.open("https://www.ccf.org.cn/") }} className='div8b9'><img src={ccf1} /></div>
|
||||
</div>
|
||||
<div className='flex_div'>
|
||||
承办方
|
||||
<div className='flex_div'>
|
||||
<div onClick={() => { window.open("https://www.zhejianglab.com/home") }} className='div8b9 mr20'><img src={sponsor42} alt='之江实验室' className='gitlink'/></div>
|
||||
<div onClick={() => { window.open("https://www.gitlink.org.cn/zone/CCF-ODC") }} className='div8b9'><img src={log71} alt='ccf开源发展委员会' className='xjy'/></div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
协办方
|
||||
<div className='flex_div'>
|
||||
<div onClick={() => { window.open("https://www.gitlink.org.cn/") }} className='div8b9 mr35'><img src={gitlink} className='gitlink' /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>}
|
||||
|
||||
{round === 2 && <div className='cont1 cont mb10'>
|
||||
<div>
|
||||
主办方
|
||||
|
|
|
|||
|
|
@ -0,0 +1,175 @@
|
|||
import React, { Fragment } from 'react';
|
||||
import Step from '../timerShaft/step';
|
||||
import lightspot1 from '../../img/lightspot1.png';
|
||||
import lightspot2 from '../../img/lightspot2.png';
|
||||
import lightspot3 from '../../img/lightspot3.png';
|
||||
import lightspot4 from '../../img/lightspot4.png';
|
||||
import '../lightspot/index.scss';
|
||||
import '../timerShaft/index.scss';
|
||||
|
||||
|
||||
function Lightspot({round}) {
|
||||
const stepArr2022 = [{
|
||||
title: "Step1",
|
||||
date: "4.15",
|
||||
content: "GLCC夏令营活动发布"
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "4.15-5.19",
|
||||
content: "社区项目报名,提交课题"
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "5.20-5.25",
|
||||
content: "公示社区项目名单"
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "5.26-6.24",
|
||||
content: "学生报名,提交Proposal"
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "7.1",
|
||||
content: "公示入选学生名单",
|
||||
noArrow: true,
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "7.1-8.12",
|
||||
content: "项目开发第一阶段",
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "8.12-9.30",
|
||||
content: "项目开发第二阶段",
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "10.1-10.21",
|
||||
content: "结项审核,并公示考核结果",
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "10.21-11.11",
|
||||
content: "评选公布优秀项目和学员",
|
||||
noArrow: true,
|
||||
}
|
||||
]
|
||||
const stepArr2023 = [{
|
||||
title: "Step1",
|
||||
date: "4.29",
|
||||
content: "GLCC夏令营活动发布"
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "4.29-5.30",
|
||||
content: "社区项目报名,提交课题"
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "5.31-6.3",
|
||||
content: "课题审核及公布"
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "6.4-6.21",
|
||||
content: "学生报名,提交Proposal"
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "7.1",
|
||||
content: "公示入选学生名单",
|
||||
noArrow: true,
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "7.1-8.11",
|
||||
content: "项目开发第一阶段",
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "8.20",
|
||||
content: "中期考核,公示考核结果",
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "8.21-9.28",
|
||||
content: "项目开发第二阶段",
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "10.11",
|
||||
content: "结项考核,公示考核结果",
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "10.22",
|
||||
content: "优秀项目/学生公布及颁奖",
|
||||
noArrow: true,
|
||||
}
|
||||
]
|
||||
const step = round === 2 ? stepArr2023 : stepArr2022
|
||||
return (
|
||||
<Fragment>
|
||||
<div className="lightspot pb100">
|
||||
<div className="glcc-content">
|
||||
<h3 className="glcc-tit">活动亮点</h3>
|
||||
<div className="lightspot-content">
|
||||
<div className="info-teacher">
|
||||
<div className="teacher-text">
|
||||
<h3 className="teacher-invite">有兴趣成为GLCC的导师吗?</h3>
|
||||
<div className="teacher-content">想要扩大项目知名度和影响力,为开源项目吸引新鲜血液,培养长期开发者。通过GitLink平台,与高校建立连接,指导开源新人传授他们的开源文化,享受开源的乐趣</div>
|
||||
<div className='applyBut project'><span className='hover-none'>项目报名</span><span className='hover-show'>已结束</span></div>
|
||||
</div>
|
||||
<div className="teacher-text">
|
||||
<h3 className="teacher-invite">你是开源新手,有兴趣参加GLCC吗?</h3>
|
||||
<div className="teacher-content">想要参与一线开源项目开发,熟悉开源社区运作流程,接受资深开源软件专家指导,获得丰厚奖金和实习机会。参加GLCC,开启全新的开源之旅。</div>
|
||||
<div className='applyBut project'><span className='hover-none'>学生报名</span><span className='hover-show'>已结束</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="info-student">
|
||||
<div className="info-item">
|
||||
<img className="info-item-img" src={lightspot1} alt=''></img>
|
||||
<h3 className="info-item-tit">汇聚行业顶尖开源项目</h3>
|
||||
<div className="info-item-content">平台汇聚腾讯、百度、阿里巴巴、亚马逊云科技、滴滴等行业尖端开源项目,把握开源生态发展脉搏</div>
|
||||
</div>
|
||||
|
||||
<div className="info-item">
|
||||
<img className="info-item-img" src={lightspot2} alt=''></img>
|
||||
<h3 className="info-item-tit">覆盖全国千所高校、万名会员</h3>
|
||||
<div className="info-item-content">活动邀请10+全球顶尖开源基金会,100+顶级开源项目社区,致力营造专业、开放的开源社区</div>
|
||||
</div>
|
||||
|
||||
<div className="info-item">
|
||||
<img className="info-item-img" src={lightspot3} alt=''></img>
|
||||
<h3 className="info-item-tit">结识开源伙伴和技术大咖</h3>
|
||||
<div className="info-item-content">每个项目配备一名导师,参与开源项目开发可接受一线资深开源项目专家专业指导,结识志同道合的开发伙伴</div>
|
||||
</div>
|
||||
|
||||
<div className="info-item">
|
||||
<img className="info-item-img" src={lightspot4} alt=''></img>
|
||||
<h3 className="info-item-tit">丰厚奖励&实习绿色通道</h3>
|
||||
<div className="info-item-content">入选同学可获得丰厚奖金,并有机会进入优秀开源项目企业实习或工作,受邀参与开源大会等机会</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="timerShaft">
|
||||
<div className="glcc-content">
|
||||
<h3 className="glcc-tit">时间规划</h3>
|
||||
<div className="time-content">
|
||||
{
|
||||
step.map((item, i) => {
|
||||
return <Step {...item} title={`Step${i + 1}`} key={i}/>
|
||||
})
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Fragment>
|
||||
)
|
||||
}
|
||||
export default Lightspot;
|
||||
|
|
@ -1,146 +1,125 @@
|
|||
import React from 'react';
|
||||
import React, { Fragment } from 'react';
|
||||
import Step from './step';
|
||||
import './index.scss';
|
||||
import { formatParsedResult } from '../../api';
|
||||
|
||||
const stepArr2022 = [{
|
||||
title: "Step1",
|
||||
date: "4.15",
|
||||
content: "GLCC夏令营活动发布"
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "4.15-5.19",
|
||||
content: "社区项目报名,提交课题"
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "5.20-5.25",
|
||||
content: "公示社区项目名单"
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "5.26-6.24",
|
||||
content: "学生报名,提交Proposal"
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "7.1",
|
||||
content: "公示入选学生名单",
|
||||
noArrow: true,
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "7.1-8.12",
|
||||
content: "项目开发第一阶段",
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "8.12-9.30",
|
||||
content: "项目开发第二阶段",
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "10.1-10.21",
|
||||
content: "结项审核,并公示考核结果",
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "10.21-11.11",
|
||||
content: "评选公布优秀项目和学员",
|
||||
noArrow: true,
|
||||
}
|
||||
]
|
||||
const stepArr = [{
|
||||
title: "Step1",
|
||||
date: "4.29",
|
||||
content: "GLCC夏令营活动发布"
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "4.29-5.30",
|
||||
content: "社区项目报名,提交课题"
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "5.31-6.3",
|
||||
content: "课题审核及公布"
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "6.4-6.21",
|
||||
content: "学生报名,提交Proposal"
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "7.1",
|
||||
content: "公示入选学生名单",
|
||||
noArrow: true,
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "7.1-8.11",
|
||||
content: "项目开发第一阶段",
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "8.20",
|
||||
content: "中期考核,公示考核结果",
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "8.21-9.28",
|
||||
content: "项目开发第二阶段",
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "10.11",
|
||||
content: "结项考核,公示考核结果",
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "10.22",
|
||||
content: "优秀项目/学生公布及颁奖",
|
||||
noArrow: true,
|
||||
}
|
||||
]
|
||||
function TimerShaft(props) {
|
||||
const {current_user, period, history, showLoginDialog, id, glccSettings} = props;
|
||||
let repoApplyEnd = undefined
|
||||
const step = [{
|
||||
title: "Step1",
|
||||
date: "4.22",
|
||||
content: "GLCC夏令营活动发布"
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "4.22-5.24",
|
||||
content: "社区项目报名,提交课题"
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "5.25-5.30",
|
||||
content: "课题审核及公布"
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "5.31-6.23",
|
||||
content: "学生报名,提交Proposal"
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "6.28",
|
||||
content: "公示入选学生名单",
|
||||
noArrow: true,
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "7.1-8.18",
|
||||
content: "项目开发第一阶段",
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "8.30",
|
||||
content: "中期考核,公示考核结果",
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "8.31-10.20",
|
||||
content: "项目开发第二阶段",
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "10.31",
|
||||
content: "结项考核,公示考核结果",
|
||||
},
|
||||
{
|
||||
title: "Step2",
|
||||
date: "11月",
|
||||
content: "优秀项目/学生公布及颁奖",
|
||||
noArrow: true,
|
||||
}]
|
||||
|
||||
function TimerShaft({round, glccSettings}) {
|
||||
// if(glccSettings && glccSettings.length > 12){
|
||||
// stepArr[1].date = getRangeTime(glccSettings[0].value);
|
||||
// stepArr[2].date = getRangeTime(glccSettings[1].value);
|
||||
// stepArr[3].date = getRangeTime(glccSettings[2].value);
|
||||
// stepArr[4].date = getTime(glccSettings[3].value);
|
||||
// stepArr[5].date = getRangeTime(glccSettings[11].value);
|
||||
// stepArr[6].date = getTime(glccSettings[7].value);
|
||||
// stepArr[7].date = getRangeTime(glccSettings[12].value);
|
||||
// stepArr[8].date = getTime(glccSettings[9].value);
|
||||
// stepArr[9].date = getTime(glccSettings[4].value);
|
||||
// }
|
||||
const step = round === 2 ? stepArr : stepArr2022
|
||||
|
||||
// 截取月份/日期
|
||||
function getRangeTime(value){
|
||||
return value.split(",").map(item=>`${new Date(item).getMonth()+1}.${new Date(item).getDate()}`).join("-");
|
||||
function goToApply(){
|
||||
const url = period === "repoApply" ? `/glcc/apply` : `/glcc/${id}/subjects`;
|
||||
if(current_user && !current_user.login){
|
||||
showLoginDialog(url);
|
||||
return;
|
||||
}
|
||||
history.push(url);
|
||||
}
|
||||
|
||||
function getTime(value){
|
||||
const time = new Date(value.split(",")[0]);
|
||||
return `${new Date(time).getMonth()+1}.${new Date(time).getDate()}`;
|
||||
if(glccSettings){
|
||||
// 活动发布、项目课题报名
|
||||
const repoApply = glccSettings.filter(item=>item.name === "repoApply");
|
||||
repoApply[0] && (step[0].date = formatParsedResult(repoApply, "startMonthDay"))
|
||||
repoApply[0] && (step[1].date = formatParsedResult(repoApply, "rangeConcatDot"))
|
||||
if(repoApply[0]){
|
||||
repoApplyEnd = new Date(repoApply[0].value.split(",")[1]).getTime()-new Date().getTime() < 0
|
||||
}
|
||||
// 学生报名
|
||||
const stuApply = glccSettings.filter(item=>item.name === "stuApply");
|
||||
stuApply[0] && (step[3].date = formatParsedResult(stuApply, "rangeConcatDot"))
|
||||
// 入选学生名单公示-取配置的截止时间
|
||||
const stuPublic = glccSettings.filter(item=>item.name === "stuPublic");
|
||||
stuPublic[0] && (step[4].date = formatParsedResult(stuPublic, "startMonthDay"))
|
||||
// 中期考核结果公示-取配置的截止时间
|
||||
const mediumExamine = glccSettings.filter(item=>item.name === "mediumExamine3");
|
||||
mediumExamine[0] && (step[6].date = formatParsedResult(mediumExamine, "startMonthDay"))
|
||||
// 结项考核结果公示-取配置的截止时间
|
||||
const finalExamine = glccSettings.filter(item=>item.name === "finalExamine3");
|
||||
finalExamine[0] && (step[8].date = formatParsedResult(finalExamine, "startMonthDay"))
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="timerShaft">
|
||||
<div className="glcc-content">
|
||||
<h3 className="glcc-tit">时间规划</h3>
|
||||
<div className="time-content">
|
||||
{
|
||||
step.map((item, i) => {
|
||||
return <Step {...item} title={`Step${i + 1}`} key={i}/>
|
||||
})
|
||||
}
|
||||
<Fragment>
|
||||
<div className="applyHomeBox">
|
||||
<h3 className="glcc-tit">活动报名</h3>
|
||||
<div className="glcc-content info-teacher">
|
||||
<div className="teacher-text">
|
||||
<h3 className="teacher-invite">有兴趣成为GLCC的导师吗?</h3>
|
||||
<div className="teacher-content">想要扩大项目知名度和影响力,为开源项目吸引新鲜血液,培养长期开发者。通过GitLink平台,与高校建立连接,指导开源新人传授他们的开源文化,享受开源的乐趣</div>
|
||||
{period === "repoApply" ? <div className='applyBut' onClick={goToApply}>立即报名</div> : <div className='applyBut project'><span className='hover-none'>项目报名</span><span className='hover-show'>{repoApplyEnd ? "已结束" : "敬请期待"}</span></div>}
|
||||
</div>
|
||||
<div className="teacher-text">
|
||||
<h3 className="teacher-invite">你是开源新手,有兴趣参加GLCC吗?</h3>
|
||||
<div className="teacher-content">想要参与一线开源项目开发,熟悉开源社区运作流程,接受资深开源软件专家指导,获得丰厚奖金和实习机会。参加GLCC,开启全新的开源之旅。</div>
|
||||
{(period === "stuApply" || period === "stuApply1") ? <div className='applyBut' onClick={goToApply}>学生报名</div> : <div className='applyBut project'><span className='hover-none'>学生报名</span><span className='hover-show'>{(period === "repoApply" || !period) ? "敬请期待" : "已结束"}</span></div>}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="timerShaft">
|
||||
<div className="glcc-content">
|
||||
<h3 className="glcc-tit">时间规划</h3>
|
||||
<div className="time-content">
|
||||
{
|
||||
step.map((item, i) => {
|
||||
return <Step {...item} title={`Step${i + 1}`} key={i}/>
|
||||
})
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Fragment>
|
||||
)
|
||||
}
|
||||
export default TimerShaft;
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
.timerShaft {
|
||||
background: url("../../img/time-bg.png");
|
||||
background: url("../../img/time-bg1.png");
|
||||
background-size: 100% 100%;
|
||||
width: 100%;
|
||||
height: 32.34375vw;
|
||||
|
|
@ -58,3 +58,62 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.applyHomeBox{
|
||||
background: url("../../img/time-bg.png");
|
||||
background-size: 100% 100%;
|
||||
width: 100%;
|
||||
min-height: 450px;
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
justify-content: center;
|
||||
.info-teacher {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 50px;
|
||||
padding-top: 0px;
|
||||
}
|
||||
.teacher-text {
|
||||
margin-right: 2.84%;
|
||||
.applyBut{
|
||||
width: 120px;
|
||||
height: 36px;
|
||||
background-color: #466aff;
|
||||
border-radius: 2px;
|
||||
color: white;
|
||||
display: block;
|
||||
line-height: 36px;
|
||||
text-align: center;
|
||||
&:hover{
|
||||
opacity: .8;
|
||||
color: white !important;
|
||||
cursor: pointer;
|
||||
.hover-show{
|
||||
display: inline-block;
|
||||
}
|
||||
.hover-none{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
&:hover.project{
|
||||
background-color:#abafbe;
|
||||
cursor: default;
|
||||
}
|
||||
.hover-show{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.teacher-invite {
|
||||
color: #202d40;
|
||||
font-size: 24px;
|
||||
line-height: 26px;
|
||||
margin: 35px auto 25px !important;
|
||||
}
|
||||
|
||||
.teacher-content {
|
||||
color: #6c7283;
|
||||
font-size: 14px;
|
||||
line-height: 26px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 882 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 459 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 877 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 699 KiB |
|
|
@ -11,7 +11,7 @@ import "./index.scss";
|
|||
import Loadable from "react-loadable";
|
||||
import Loading from "../Loading";
|
||||
import { ImageLayerOfCommentHOC } from "../modules/page/layers/ImageLayerOfCommentHOC";
|
||||
import { getGlccSettings, getStudentApplyInfo, hasAuditRole } from "./api";
|
||||
import { currentRound, getGlccSettings, getStudentApplyInfo, hasAuditRole } from "./api";
|
||||
import { message } from "antd";
|
||||
|
||||
|
||||
|
|
@ -30,6 +30,11 @@ const Help = Loadable({
|
|||
loader: () => import("./help"),
|
||||
loading: Loading,
|
||||
});
|
||||
// 开源夏令营新闻列表页面
|
||||
const News = Loadable({
|
||||
loader: () => import("./news"),
|
||||
loading: Loading,
|
||||
});
|
||||
// 学生报名课题
|
||||
const Student = Loadable({
|
||||
loader: () => import("./student"),
|
||||
|
|
@ -89,10 +94,8 @@ const MiddleResult = Loadable({
|
|||
});
|
||||
const Glcc = (propsF) => {
|
||||
const {current_user, showLoginDialog, match:{params:{id}}} = propsF;
|
||||
// 当届
|
||||
const currentRound = 2;
|
||||
// round:2022届(1) 2023届(2)
|
||||
const [round, setRound] = useState(2);
|
||||
// round:2022届(1) 2023届(2) 2024届(3)
|
||||
const [round, setRound] = useState(3);
|
||||
// glcc 所处阶段 repoApply(项目报名) stuApply(学生报名阶段)
|
||||
const [period, setPeriod] = useState(undefined);
|
||||
// glcc后台时间配置
|
||||
|
|
@ -111,13 +114,13 @@ const Glcc = (propsF) => {
|
|||
const [isFinalExamineByToTutor, setIsFinalExamineByToTutor] = useState(false);
|
||||
|
||||
useEffect(()=>{
|
||||
if(id && id === "2022"){
|
||||
setRound(1);
|
||||
if(id){
|
||||
setRound(id === "2022" ? 1 : id === "2023" ? 2 : 3);
|
||||
}
|
||||
}, [id])
|
||||
useEffect(()=>{
|
||||
// 获取当前glcc配置
|
||||
getGlccSettings({round: currentRound}).then(res=>{
|
||||
getGlccSettings({round: currentRound, type: "timeSetting"}).then(res=>{
|
||||
if(res && res.message === "success"){
|
||||
setGLccSetting(res.data);
|
||||
const nowTime = new Date().getTime();
|
||||
|
|
@ -244,14 +247,14 @@ const Glcc = (propsF) => {
|
|||
{period === "repoApply" && <Route
|
||||
path="/glcc/apply"
|
||||
render={(props) => (
|
||||
<Apply round={round} {...propsF} {...props}/>
|
||||
<Apply round={currentRound} {...propsF} {...props} glccSettings={glccSettings}/>
|
||||
)}
|
||||
></Route>}
|
||||
{/* 导师报名课题路由通道(补录) */}
|
||||
{applyRepo && <Route
|
||||
path="/glcc/sign"
|
||||
render={(props) => (
|
||||
<Apply round={round} {...propsF} {...props}/>
|
||||
<Apply round={currentRound} {...propsF} {...props} glccSettings={glccSettings}/>
|
||||
)}
|
||||
></Route>}
|
||||
{/* 导师-学生配对阶段 */}
|
||||
|
|
@ -277,25 +280,34 @@ const Glcc = (propsF) => {
|
|||
<Help {...propsF} {...props} />
|
||||
)}
|
||||
></Route>
|
||||
{!(round === 2 && !repoPublic) && <Route
|
||||
|
||||
{/* 新闻列表 */}
|
||||
<Route
|
||||
path="/glcc/news"
|
||||
render={(props) => (
|
||||
<News {...propsF} {...props} />
|
||||
)}
|
||||
></Route>
|
||||
|
||||
{!(round === currentRound && !repoPublic) && <Route
|
||||
path="/glcc/:id/subjects/detail/:taskId"
|
||||
render={(props) => (
|
||||
<TaskDetail {...propsF} {...props} applyTaskId={applyTaskId} applyTask={applyTask} period={period} round={round} currentRound={currentRound}/>
|
||||
)}
|
||||
></Route>}
|
||||
{/* 项目/课题列表 */}
|
||||
{!(round === 2 && !repoPublic) && <Route
|
||||
{!(round === currentRound && !repoPublic) && <Route
|
||||
path="/glcc/:id/projects"
|
||||
render={(props) => (
|
||||
<Project period={period} round={round} {...propsF} {...props} applyTaskId={applyTaskId} setStudentInfoReset={setStudentInfoReset} applyTask={applyTask} currentRound={currentRound}/>
|
||||
<Project period={period} round={round} {...propsF} {...props} applyTaskId={applyTaskId} setStudentInfoReset={setStudentInfoReset} applyTask={applyTask} currentRound={currentRound} glccSettings={glccSettings}/>
|
||||
)}
|
||||
></Route>}
|
||||
|
||||
{/* 课题列表 */}
|
||||
{!(round === 2 && !repoPublic) && <Route
|
||||
{!(round === currentRound && !repoPublic) && <Route
|
||||
path="/glcc/:id/subjects"
|
||||
render={(props) => (
|
||||
<Project period={period} round={round} {...propsF} {...props} applyTaskId={applyTaskId} setStudentInfoReset={setStudentInfoReset} cancelCount={cancelCount} applyTask={applyTask} currentRound={currentRound} lockedTaskName={lockedTaskName}/>
|
||||
<Project period={period} round={round} {...propsF} {...props} applyTaskId={applyTaskId} setStudentInfoReset={setStudentInfoReset} cancelCount={cancelCount} applyTask={applyTask} currentRound={currentRound} lockedTaskName={lockedTaskName} glccSettings={glccSettings}/>
|
||||
)}
|
||||
></Route>}
|
||||
|
||||
|
|
|
|||
|
|
@ -106,3 +106,38 @@
|
|||
line-height: 24px;
|
||||
}
|
||||
}
|
||||
.previousReview{
|
||||
.ant-popover-inner-content{
|
||||
padding: 4px;
|
||||
}
|
||||
.ant-menu-item:hover{
|
||||
background-color: #E6ECFF;
|
||||
}
|
||||
}
|
||||
// glcc公共样式
|
||||
.gobackBox{
|
||||
margin: 0 auto;
|
||||
padding: 25px 0 12px;
|
||||
color: #202d40;
|
||||
font-size: 16px;
|
||||
border-bottom: 1px dashed #bec5d5;
|
||||
a{
|
||||
color:#a4aabb;
|
||||
}
|
||||
}
|
||||
.glccTable{
|
||||
border: 1px solid white;
|
||||
.ant-table-thead > tr > th{
|
||||
background-color: #DFE8FF;
|
||||
}
|
||||
.ant-table-tbody > tr > td{
|
||||
background-color: #ECF2FF;
|
||||
border-bottom: 1px dashed #bec5d5;
|
||||
font-size: 15px;
|
||||
color: #353f5e;
|
||||
}
|
||||
.ant-table-pagination.ant-pagination{
|
||||
margin: 26px 20px 0 0;
|
||||
padding-bottom: 26px;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import banner from "../img/newsBg.png";
|
||||
import bgPng from "../img/bgPng.png";
|
||||
import './index.scss';
|
||||
import { Table } from 'antd';
|
||||
import axios from 'axios';
|
||||
|
||||
function FreeProject(propsF) {
|
||||
const pageSize = 20;
|
||||
const [list, setList] = useState([]);
|
||||
const [current, setCurrent] = useState(1);
|
||||
const [total, setTotal] = useState(0);
|
||||
|
||||
useEffect(()=>{
|
||||
window.scrollTo(0, 0);
|
||||
getNewsList();
|
||||
},[current])
|
||||
|
||||
function getNewsList(){
|
||||
const url = `/topics.json?topic_type=glcc_news`;
|
||||
axios.get(url, {
|
||||
params: {
|
||||
page: current,
|
||||
limit: pageSize
|
||||
}
|
||||
}).then(result => {
|
||||
if (result && result.data) {
|
||||
setList(result.data.topics);
|
||||
setTotal(result.data.total_count);
|
||||
}
|
||||
}).catch(error => { })
|
||||
}
|
||||
|
||||
const columns = [
|
||||
{ title: '序号', dataIndex: 'index', align: 'center', className:"taskTableColumns", width: '6%', render: (text, item, index) => <span>{(current-1)*pageSize+index + 1}</span> },
|
||||
{ title: '标题', dataIndex: 'title', className:"taskTableColumns taskName", width: '28%', ellipsis: true, render: (text, item) => <a href={item.url} target='_black'>{text}</a> },
|
||||
{ title: '时间', dataIndex: 'created_time', className:"taskTableColumns", width: '12%', ellipsis: true, render: (text)=><span>{text.split(' ')[0]}</span> }
|
||||
]
|
||||
|
||||
return(
|
||||
<div className="glcc_news pb50">
|
||||
<img className="newsBanner" src={banner} alt=''></img>
|
||||
<div className='gobackBox news_content_center mb20'>
|
||||
<Link to={`/glcc`}>开源夏令营 / </Link>
|
||||
新闻中心
|
||||
</div>
|
||||
<Table
|
||||
className='glccTable news_content_center'
|
||||
columns={columns}
|
||||
dataSource={list}
|
||||
pagination={{
|
||||
current: current,
|
||||
pageSize: pageSize,
|
||||
total: total,
|
||||
hideOnSinglePage: true,
|
||||
onChange: (page)=>{setCurrent(page)}
|
||||
}}
|
||||
/>
|
||||
<img src={bgPng} alt='' className='bgPng3' />
|
||||
<img src={bgPng} alt='' className='bgPng4' />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default FreeProject;
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
.glcc_news{
|
||||
min-height: 85vh;
|
||||
background: linear-gradient( 180deg, #E9F0FF 0%, #DEE8FF 52%, #F3F4F8 100%);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
.newsBanner{
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
object-fit: cover;
|
||||
}
|
||||
.news_content_center{
|
||||
width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.bgPng3, .bgPng4{
|
||||
width: 146px;
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
top: 462px;
|
||||
left: 100px;
|
||||
}
|
||||
.bgPng4{
|
||||
top: 750px;
|
||||
left: auto;
|
||||
right: 310px;
|
||||
}
|
||||
}
|
||||
|
|
@ -96,6 +96,7 @@
|
|||
}
|
||||
// 项目详情框
|
||||
.projectDetailBox {
|
||||
word-break: break-all;
|
||||
&.byTask {
|
||||
background-image: linear-gradient(180deg, #f1f5ff 0%, #ffffff 100%);
|
||||
border: 1px solid #ffffff;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React, { useState } from 'react';
|
|||
import { Button, message, Tooltip } from 'antd';
|
||||
import Nodata from '../../../forge/Nodata';
|
||||
import { useEffect } from 'react';
|
||||
import { getProjectById } from '../../api';
|
||||
import { getProjectById, rewardMoney, rewardSettingRound } from '../../api';
|
||||
import './index.scss';
|
||||
|
||||
export default ({ detail, projectId, applyTaskId, period, showTask=true, applyTask, id, round, listLen }) => {
|
||||
|
|
@ -45,6 +45,7 @@ export default ({ detail, projectId, applyTaskId, period, showTask=true, applyTa
|
|||
<div className="center">
|
||||
<div className="taskDesc">{item.taskDesc}</div>
|
||||
{item.taskUrl && <div className="taskUrl oneLine">课题链接: <a href={item.taskUrl} target={"_blank"}>{item.taskUrl}</a></div>}
|
||||
{round >= rewardSettingRound && item.settingRewardValue !== rewardMoney && <div className="taskUrl oneLine"><span className="labelInfoBox">奖励备注: </span>{item.settingRewardRemark}</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>}
|
||||
|
|
@ -59,7 +60,7 @@ export default ({ detail, projectId, applyTaskId, period, showTask=true, applyTa
|
|||
<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 className="right oneLine taskUrl"><span className='taskReward'>{round >= rewardSettingRound ? item.settingRewardValue === rewardMoney ? item.settingRewardRemark ? `¥ ${item.settingRewardRemark}` : "" : item.settingRewardValue : `¥ ${item.taskReward}`}</span></div>
|
||||
</div>
|
||||
}) : <Nodata _html="课题暂无数据" small={true}/>)}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import Loadable from "react-loadable";
|
|||
import Loading from "../../Loading";
|
||||
import { Link } from 'react-router-dom';
|
||||
import { useEffect } from 'react';
|
||||
import { currentRound, formatParsedResult } from '../api';
|
||||
|
||||
// 项目列表页面
|
||||
const ProjectList = Loadable({
|
||||
|
|
@ -20,8 +21,11 @@ const TaskList = Loadable({
|
|||
});
|
||||
|
||||
function Project(propsF) {
|
||||
const {location, match:{params:{id}}} = propsF;
|
||||
const {location, match:{params:{id}}, glccSettings, round} = propsF;
|
||||
const {pathname} = location;
|
||||
const studentApplyTime = glccSettings && glccSettings.filter(item=>item.name === "stuApply");
|
||||
const applyTime = studentApplyTime && formatParsedResult(studentApplyTime, "rangeDay")
|
||||
|
||||
useEffect(()=>{
|
||||
window.scrollTo(0, 0);
|
||||
},[])
|
||||
|
|
@ -30,7 +34,7 @@ function Project(propsF) {
|
|||
<div className="glcc_project">
|
||||
<div className='projectBannerBox'>
|
||||
<img className="glcc-banner" src={banner} alt=''></img>
|
||||
<div className='stuApplytimeBox'>学生报名时间: {id === '2022' ? '2022年5月26日-6月24日' : '2023年6月4日-6月21日'}</div>
|
||||
{round === currentRound && applyTime && <div className='stuApplytimeBox'>学生报名时间: {applyTime}</div>}
|
||||
</div>
|
||||
<div className='head'>
|
||||
<Link to={`/glcc/${id}/subjects`} className={!pathname.endsWith('projects') ? 'active' : ''}>课题列表</Link>
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@
|
|||
}
|
||||
// 项目详情框
|
||||
.projectDetailBox{
|
||||
word-break: break-all;
|
||||
&.byTask{
|
||||
background-image:linear-gradient(180deg,#f1f5ff 0%,#ffffff 100%);
|
||||
border:1px solid #ffffff;
|
||||
|
|
@ -177,7 +178,6 @@
|
|||
color:#465474;
|
||||
font-size:16px;
|
||||
line-height: 28px;
|
||||
margin-bottom: 5px;
|
||||
a{color:#466aff;}
|
||||
}
|
||||
.applyBut{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, {useEffect, useState } from 'react';
|
||||
import { Button, Spin, Tooltip} from 'antd';
|
||||
import { getTaskById } from '../../api';
|
||||
import { getTaskById, rewardMoney, rewardSettingRound } from '../../api';
|
||||
import bgPng from "../../img/bgPng.png";
|
||||
import '../index.scss';
|
||||
import './index.scss';
|
||||
|
|
@ -41,7 +41,10 @@ function TaskDetail(props) {
|
|||
</div>
|
||||
<div className="detailCont">
|
||||
<div><span className='smallTil'>所属项目</span>{detail.projectName}</div>
|
||||
<div className='moneyBox'><span className='smallTil'>课题奖金</span><span className='money'>¥{detail.taskReward}</span></div>
|
||||
<div className='moneyBox'><span className='smallTil'>课题奖励</span><span className='money'>
|
||||
{round >= rewardSettingRound ? detail.settingRewardValue !== rewardMoney ? detail.settingRewardValue : `¥${detail.settingRewardRemark}` : `¥${detail.taskReward}`}
|
||||
</span></div>
|
||||
{detail.settingRewardValue !== rewardMoney && detail.settingRewardRemark && <div><span className="smallTil">奖励备注</span>{detail.settingRewardRemark}</div>}
|
||||
<div><span className='smallTil'>导师信息</span>{detail.tutorName}{detail.tutorMail &&` | ${detail.tutorMail}`}</div>
|
||||
<div className="bor"></div>
|
||||
<div><span className='smallTil'>课题简介</span></div>
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@
|
|||
color:#465474;
|
||||
font-size:15px;
|
||||
margin-top: 20px;
|
||||
word-break: break-all;
|
||||
.bor{
|
||||
margin: 0 -15px 20px -15px;
|
||||
border-bottom: 1px dashed #bec5d5;;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React, { Fragment, useEffect, useState } from 'react';
|
||||
import { Checkbox, Input, message, Modal, Table, Tooltip } from 'antd';
|
||||
import './index.scss';
|
||||
import { cancelTaskApply, taskList } from '../../api';
|
||||
import { cancelTaskApply, rewardSettingRound, taskList } from '../../api';
|
||||
import ProjectDetail from '../component/projectDetail';
|
||||
import bgPng from "../../img/bgPng.png";
|
||||
const { Search } = Input;
|
||||
|
|
@ -29,7 +29,7 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial
|
|||
{ title: '课题名称', dataIndex: 'taskName', className:"taskTableColumns taskName", width: '24%', ellipsis: true, render: (text, item) => <Tooltip title={text} placement="topLeft"><span onClick={()=>{window.open(`/glcc/${id}/subjects/detail/${item.id}`)}}>{text}</span></Tooltip> },
|
||||
{ title: '课题类型', dataIndex: 'projectType', className:"taskTableColumns", width: '12%', ellipsis: true, },
|
||||
{ title: '项目名称', dataIndex: 'projectName', className:"taskTableColumns", width: '24%', ellipsis: true, render: (text) => <Tooltip title={text} placement="topLeft">{text}</Tooltip> },
|
||||
{ title: '课题奖金', dataIndex: 'taskReward', className:"taskTableColumns", ellipsis: true, width: '10%', render: (text) => <Tooltip title={text} placement="topLeft"><span>{text}</span></Tooltip> },
|
||||
{ title: round >= rewardSettingRound ? '课题奖励' : '课题奖金', dataIndex: round >= rewardSettingRound ? 'settingRewardValue' : 'taskReward', className:"taskTableColumns", ellipsis: true, width: '10%', render: (text) => <Tooltip title={text} placement="topLeft"><span>{text}</span></Tooltip> },
|
||||
{
|
||||
title: '操作', dataIndex: 'action', align: 'center', className:"actionColumns taskTableColumns", render: ((text, item, index) => {
|
||||
return (
|
||||
|
|
@ -129,13 +129,12 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial
|
|||
setLoading(true);
|
||||
const params = {
|
||||
curPage: current,
|
||||
keyword,
|
||||
keyword: keyword || "",
|
||||
pageSize,
|
||||
userId: apply ? current_user.user_id : '',
|
||||
round,
|
||||
locked: isAvailable ? false : undefined
|
||||
}
|
||||
console.log('params', params);
|
||||
taskList(params).then(response => {
|
||||
if (response && response.message === "success") {
|
||||
const data = response.data.rows;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
import { Popover } from 'antd';
|
||||
import { Popover, Menu } from 'antd';
|
||||
import qqChat from "./img/qqChat.png";
|
||||
import './index.scss';
|
||||
|
||||
|
|
@ -12,6 +12,21 @@ function SiderBar() {
|
|||
</div>
|
||||
)
|
||||
|
||||
const menu = (
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a target="_blank" rel="noopener noreferrer" href="/glcc/2022">
|
||||
GLCC2022
|
||||
</a>
|
||||
</Menu.Item>
|
||||
<Menu.Item>
|
||||
<a target="_blank" rel="noopener noreferrer" href="/glcc/2023">
|
||||
GLCC2023
|
||||
</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
|
||||
return (
|
||||
// 开源夏令营定制帮助中心调整按钮
|
||||
<div className={"-task-sidebar"}>
|
||||
|
|
@ -25,10 +40,12 @@ function SiderBar() {
|
|||
<i className='iconfont icon-bangzhuzhongxinicon font-20'></i>
|
||||
帮助中心
|
||||
</div>
|
||||
<div className={"glccHelp"} onClick={()=>window.open("/glcc/2022")}>
|
||||
<i className='iconfont icon-zanting font-17'></i>
|
||||
往期回顾
|
||||
</div>
|
||||
<Popover placement='left' content={menu} title={null} forceRender={true} overlayClassName="previousReview">
|
||||
<div className={"glccHelp"}>
|
||||
<i className='iconfont icon-zanting font-17'></i>
|
||||
往期回顾
|
||||
</div>
|
||||
</Popover>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ function TopEdition({register,current_user}) {
|
|||
const url = `/topics.json?topic_type=banner`;
|
||||
axios.get(url,{
|
||||
params:{
|
||||
limit:5
|
||||
limit:6
|
||||
}
|
||||
}).then(result=>{
|
||||
if(result){
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ export default ({ mdID, onChange, onCMBeforeChange, onCMBlur, error = false, cla
|
|||
const ch = cursor.ch;//列
|
||||
const startIndex = cm.getRange({line,ch:0},{line,ch}).lastIndexOf("#");
|
||||
//替换内容
|
||||
cm.replaceRange(`[#${i.project_issues_index}](/${owner}/${projectsId}/issues/${i.project_issues_index}) `,{line,ch:startIndex},{line,ch});
|
||||
cm.replaceRange(`[#${i.subject}](/${owner}/${projectsId}/issues/${i.project_issues_index}) `,{line,ch:startIndex},{line,ch});
|
||||
//鼠标聚焦
|
||||
cm.focus();
|
||||
// 保存引用的issue
|
||||
|
|
|
|||
Loading…
Reference in New Issue