Merge branch 'feature_GLCC' of http://106.75.45.236:3000/tongChong/forgeplus-react into feature_GLCC2

This commit is contained in:
谢思 2022-05-28 14:17:54 +08:00
commit 4b89f85874
6 changed files with 17 additions and 15 deletions

View File

@ -25,7 +25,7 @@ if (isDev) {
}
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
window.location.search.indexOf('debug=s') !== -1 ? 'student' :
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'student'
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin'
}
window._debugType = debugType;
export function initAxiosInterceptors(props) {

View File

@ -11,8 +11,8 @@ function CoderDepotReadme({ operate , history , readme , ChangeFile }){
const [ content ,setContent ] = useState(undefined);
useEffect(()=>{
if(readme && readme.content){
setContent(readme.content);
if(readme && readme.replace_content){
setContent(readme.replace_content);
}else{
setContent(undefined);
}

View File

@ -21,7 +21,7 @@ class CoderRootFileDetail extends Component {
value: undefined,
language: undefined,
languages: undefined,
description: props.detail.content,
description: props.detail.replace_content,
menuList:undefined
};
}
@ -36,12 +36,12 @@ class CoderRootFileDetail extends Component {
};
componentDidUpdate=(prevProps)=>{
const { content } = this.props && this.props.detail;
const prevcontent = prevProps.detail && prevProps.detail.content;
if (content && prevcontent) {
if (prevcontent !== content){
const { replace_content } = this.props && this.props.detail;
const prevcontent = prevProps.detail && prevProps.detail.replace_content;
if (replace_content && prevcontent) {
if (prevcontent !== replace_content){
this.setState({
description: content
description: replace_content
});
}
}
@ -319,7 +319,7 @@ class CoderRootFileDetail extends Component {
{...this.state}
language={language ? language : "javascript"}
filepath={`/${detail.path}`}
content={description}
content={detail.content}
readOnly={readOnly}
editorType="update"
currentBranch={currentBranch}

View File

@ -18,7 +18,7 @@ const menu = [
// {name:"资源库",index:"resources"},
{name:"里程碑",index:"versions"},
{name:"维基 (Wiki)",index:"wiki"},
{name:"服务",index:"services"},
// {name:"服务",index:"services"},
{name:"动态",index:"activity"},
]
class Setting extends Component {

View File

@ -62,7 +62,7 @@ function Lightspot(props) {
<div className="info-item">
<img className="info-item-img" src={lightspot1} alt=''></img>
<h3 className="info-item-tit">汇聚行业顶尖开源项目</h3>
<div className="info-item-content">平台汇聚华为xiuos鲲鹏开源基金会飞腾浪潮等行业尖端开源项目把握开源生态发展脉搏</div>
<div className="info-item-content">平台汇聚商汤腾讯百度阿里巴巴亚马逊云科技滴滴等行业尖端开源项目把握开源生态发展脉搏</div>
</div>
<div className="info-item">

View File

@ -21,12 +21,12 @@ const gradeList = [
{ id: '研二', name: '研二' },
{ id: '研三', name: '研三' }];
function Apply(props) {
const { form, current_user, showNotification, match, setStudentInfoReset } = props;
const { form, current_user, showNotification, match,history, setStudentInfoReset } = props;
const taskId = Number(match.params.taskId);
//
// current_user && (current_user.user_id = 6)
// current_user && (current_user.userName = "使")
const isStudentApplyDate = new Date().getTime() > new Date('2022-05-26').getTime() && new Date().getTime() < new Date('2022-06-26').getTime();
const isStudentApplyDate = new Date().getTime() > new Date('2022-05-26').getTime() && new Date().getTime() < new Date('2022-06-25').getTime();
const { getFieldDecorator, validateFields, setFieldsValue, validateFieldsAndScroll } = form;
const [imageUrl, setImageUrl] = useState(undefined);
@ -53,7 +53,7 @@ function Apply(props) {
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()) {
@ -193,6 +193,7 @@ function Apply(props) {
setStudentInfoReset(Math.random());
setReload(Math.random());
setLoading(false);
history.push(`/glcc/student/2`)
}
});
} else {
@ -202,6 +203,7 @@ function Apply(props) {
setStudentInfoReset(Math.random());
setReload(Math.random());
setLoading(false);
history.push(`/glcc/student/2`)
}
});
}