diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js
index 873e08bd2..9e39adc61 100644
--- a/src/forge/Main/Detail.js
+++ b/src/forge/Main/Detail.js
@@ -283,9 +283,7 @@ class Detail extends Component {
this.canvasChannel();
this.setState({
firstSync: true,
- secondSync: false
- })
- this.setState({
+ secondSync: false,
mirror_status:1
})
} else if (data.mirror_status === 2) {
From 105d33e63c50538ef8478e1361025f825384f5fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com>
Date: Wed, 5 Jun 2024 09:17:25 +0800
Subject: [PATCH 4/4] =?UTF-8?q?glcc=E5=AD=A6=E7=94=9F=E6=8A=A5=E5=90=8D?=
=?UTF-8?q?=E9=98=B6=E6=AE=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/glcc/api.js | 3 +
src/glcc/apply/editInfo.jsx | 11 ++--
src/glcc/apply/index.jsx | 8 +--
src/glcc/apply/repoInfo.jsx | 6 +-
src/glcc/check/index.jsx | 16 ++---
src/glcc/index.jsx | 14 ++---
src/glcc/project/component/projectDetail.jsx | 8 +--
src/glcc/project/taskDetail/index.jsx | 8 +--
src/glcc/project/taskList/index.jsx | 6 +-
src/glcc/student/index.jsx | 65 +++++++++++---------
10 files changed, 79 insertions(+), 66 deletions(-)
diff --git a/src/glcc/api.js b/src/glcc/api.js
index 7b25151c8..bfce5cc17 100644
--- a/src/glcc/api.js
+++ b/src/glcc/api.js
@@ -4,6 +4,9 @@ import fetch from './fetch';
export const currentRound = 3;
export const rewardMoney = "现金奖励"
export const rewardSettingRound = 3;
+export const yearByRound = {
+ 3: 2024
+}
// 获取当前用户项目报名信息(项目、课题)
export function getUserApplyInfo(params) {
diff --git a/src/glcc/apply/editInfo.jsx b/src/glcc/apply/editInfo.jsx
index 4c1ea722a..c62fca6f7 100644
--- a/src/glcc/apply/editInfo.jsx
+++ b/src/glcc/apply/editInfo.jsx
@@ -1,7 +1,7 @@
import React , { useCallback, useEffect , useState } from 'react';
import { Button, Form, Input, Select, Upload, message, Popconfirm, Checkbox, Icon, Tooltip } from 'antd';
import {getUploadActionUrl} from 'educoder';
-import {applyGlcc, findStudentTaskByTaskId, updateApplyGlcc} from '../api';
+import {applyGlcc, currentRound, findStudentTaskByTaskId, updateApplyGlcc} from '../api';
import TextArea from 'antd/lib/input/TextArea';
import { main_site_url } from '../fetch';
import TaskApply from './taskApply';
@@ -10,7 +10,7 @@ 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, rewardList} = props;
+ const {form, applyInfo, current_user, 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, resetFields } = form;
@@ -99,15 +99,16 @@ function EditRepoApplyInfo(props) {
tutorAddress: values[`tutorAddress${item}`],
taskDesc: values[`taskDesc${item}`],
tutorPhone: values[`tutorPhone${item}`],
- round
+ round: currentRound
})
})
const {projectName, projectType, gitlinkUrl, contactName, contactPhone, projectIntro, contactMail, joinCooperativeCommunity=false} = values;
const params ={
- projectName, projectType, gitlinkUrl, contactName, contactPhone, projectIntro, registrationTaskList, round, contactMail, joinCooperativeCommunity,
+ projectName, projectType, gitlinkUrl, contactName, contactPhone, projectIntro, registrationTaskList, contactMail, joinCooperativeCommunity,
projectLogoId: values.logo.file.response.id+"",
userId: current_user.user_id,
- userName: current_user.username
+ userName: current_user.username,
+ round: currentRound
}
setLoading(true);
if(applyInfo){
diff --git a/src/glcc/apply/index.jsx b/src/glcc/apply/index.jsx
index 118c85486..2e9896bfd 100644
--- a/src/glcc/apply/index.jsx
+++ b/src/glcc/apply/index.jsx
@@ -10,7 +10,7 @@ import './index.scss';
import { FlexAJ } from '../../forge/Component/layout';
// 项目、课题报名
function Apply(props) {
- const {current_user, round, glccSettings} = props;
+ const {current_user, glccSettings} = props;
const [reload, setReload] = useState(undefined);
const [cateList, setCateList] = useState([]);
const [userApplyInfo, setUserApplyInfo] = useState([]);
@@ -46,7 +46,7 @@ function Apply(props) {
useEffect(()=>{
// 获取当前用户报名信息
- current_user && round && getUserApplyInfo({userId: current_user.user_id, round}).then(response=>{
+ current_user && getUserApplyInfo({userId: current_user.user_id, round: currentRound}).then(response=>{
if(response && response.message === "success"){
setUserApplyInfo(response.data);
}
@@ -95,9 +95,9 @@ function Apply(props) {
{userApplyInfo.length > 0 &&
添加项目}
{userApplyInfo.length > 0 &&
- {userApplyInfo.map((item, index)=>
{setReload(Math.random())}} isAddRepo={isAddRepo} editRepoCount={editRepoCount} setEditRepoCount={setEditRepoCount} repoCount={userApplyInfo.length} scrollToEdit={scrollToEdit} rewardList={rewardList}/>
)}
+ {userApplyInfo.map((item, index)=>
{setReload(Math.random())}} isAddRepo={isAddRepo} editRepoCount={editRepoCount} setEditRepoCount={setEditRepoCount} repoCount={userApplyInfo.length} scrollToEdit={scrollToEdit} rewardList={rewardList}/>
)}
}
- {(!userApplyInfo.length || isAddRepo) &&
{setReload(Math.random())}} rewardList={rewardList}/>}
+ {(!userApplyInfo.length || isAddRepo) && {setReload(Math.random())}} rewardList={rewardList}/>}