Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

issues25489
daiao 5 years ago
commit c3d5b02d13

4
.gitignore vendored

@ -7,6 +7,10 @@
# Ignore bundler config. # Ignore bundler config.
/.bundle /.bundle
# Ignore lock config file
*.lock
*.log
# mac # mac
*.DS_Store *.DS_Store

@ -235,13 +235,16 @@ class CompetitionCommon extends Component{
this.props.showProfileCompleteDialog() this.props.showProfileCompleteDialog()
return return
} }
if(url===undefined){ if(url===undefined){
let {data,signupdata}=this.state; let {data,signupdata}=this.state;
if(signupdata.enrolled===true){ // if(signupdata.enrolled===true){
this.props.history.replace(`/courses/${data.course_id}`); // this.props.history.replace(`/courses/${data.course_id}`);
}else{ // }else{ }
if (data.member_of_course === true) { if (data.member_of_course === true) {
this.props.history.replace(`/courses/${data.course_id}`); // this.props.history.replace(`/courses/${data.course_id}`);
window.open(`/courses/${data.course_id}`)
} else { } else {
// 以学生身份调用加入课堂 进入课堂首页 // 以学生身份调用加入课堂 进入课堂首页
let url = "/courses/apply_to_join_course.json" let url = "/courses/apply_to_join_course.json"
@ -251,15 +254,18 @@ class CompetitionCommon extends Component{
} }
).then((response) => { ).then((response) => {
if (response.data.status === 0) { if (response.data.status === 0) {
this.props.history.replace(`/courses/${data.course_id}`); // this.props.history.replace();
this.Personalregistration(`/courses/${data.course_id}`)
} }
}) })
} }
}
}else{ }else{
if (url === "personal") { if (url === "personal") {
this.Personalregistration() let urls = `/competitions/${this.props.match.params.identifier}/enroll`;
this.Personalregistration(urls)
} else { } else {
this.props.history.replace(url); this.props.history.replace(url);
} }
@ -268,10 +274,10 @@ class CompetitionCommon extends Component{
} }
Personalregistration = () => { Personalregistration = (urls) => {
let {signupdata} = this.state; let {signupdata} = this.state;
let urls = `/competitions/${this.props.match.params.identifier}/enroll`;
if (signupdata.enroll_ended === true) { if (signupdata.enroll_ended === true) {
//已截止 //已截止
this.props.showNotification(`报名已截止`); this.props.showNotification(`报名已截止`);
@ -286,7 +292,8 @@ class CompetitionCommon extends Component{
if (response) { if (response) {
if (response.data) { if (response.data) {
this.props.showNotification(`报名成功,预祝您夺得桂冠!`); this.props.showNotification(`报名成功,预祝您夺得桂冠!`);
this.props.history.replace(urls); // this.props.history.replace(urls);
window.open(urls)
} }
} }
}).catch((error) => { }).catch((error) => {

@ -1,4 +1,4 @@
import React,{Component} from "React"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import locale from 'antd/lib/date-picker/locale/zh_CN'; import locale from 'antd/lib/date-picker/locale/zh_CN';

@ -1,4 +1,4 @@
import React,{Component} from "React"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import locale from 'antd/lib/date-picker/locale/zh_CN'; import locale from 'antd/lib/date-picker/locale/zh_CN';

@ -1,4 +1,4 @@
import React,{Component} from "React"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip,Spin, Pagination} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip,Spin, Pagination} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import locale from 'antd/lib/date-picker/locale/zh_CN'; import locale from 'antd/lib/date-picker/locale/zh_CN';

@ -1,4 +1,4 @@
import React,{Component} from "React"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import locale from 'antd/lib/date-picker/locale/zh_CN'; import locale from 'antd/lib/date-picker/locale/zh_CN';

@ -1,4 +1,4 @@
import React,{Component} from "React"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Tooltip} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Tooltip} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import axios from 'axios'; import axios from 'axios';

@ -1,4 +1,4 @@
import React,{Component} from "React"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import locale from 'antd/lib/date-picker/locale/zh_CN'; import locale from 'antd/lib/date-picker/locale/zh_CN';

@ -1,4 +1,4 @@
import React,{Component} from "React"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import locale from 'antd/lib/date-picker/locale/zh_CN'; import locale from 'antd/lib/date-picker/locale/zh_CN';

@ -1,4 +1,4 @@
import React,{Component} from "React"; import React,{Component} from "react";
export default function LeaderIcon(props = {}) { export default function LeaderIcon(props = {}) {
let icon = null; let icon = null;

@ -1,4 +1,4 @@
import React,{Component} from "React"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd"; import { Form, Select, Input, Button,Checkbox,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import { WordsBtn, MarkdownToHtml } from 'educoder'; import { WordsBtn, MarkdownToHtml } from 'educoder';

@ -1,4 +1,4 @@
import React,{Component} from "React"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import locale from 'antd/lib/date-picker/locale/zh_CN'; import locale from 'antd/lib/date-picker/locale/zh_CN';

@ -1,4 +1,4 @@
import React,{Component} from "React"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,DatePicker} from "antd"; import { Form, Select, Input, Button,Checkbox,DatePicker} from "antd";
import locale from 'antd/lib/date-picker/locale/zh_CN'; import locale from 'antd/lib/date-picker/locale/zh_CN';

@ -1,4 +1,4 @@
import React,{Component} from "React"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Spin,Tooltip} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Spin,Tooltip} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';

@ -1,4 +1,5 @@
import React,{Component} from "React"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Tooltip,Spin} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Tooltip,Spin} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';

@ -1,4 +1,4 @@
import React,{Component} from "React"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import { WordsBtn,markdownToHTML } from 'educoder'; import { WordsBtn,markdownToHTML } from 'educoder';

@ -1,4 +1,4 @@
import React,{Component} from "React"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';

@ -1,4 +1,4 @@
import React, {Component} from "React"; import React, {Component} from "react";
import {Form, Select, Input, Button, Checkbox, Upload, Icon, message, Modal} from "antd"; import {Form, Select, Input, Button, Checkbox, Upload, Icon, message, Modal} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';

@ -1,4 +1,4 @@
import React,{Component} from "React"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import locale from 'antd/lib/date-picker/locale/zh_CN'; import locale from 'antd/lib/date-picker/locale/zh_CN';

@ -1,4 +1,4 @@
import React,{Component} from "React"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Pagination, Table, Divider, Tag,Tooltip} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Pagination, Table, Divider, Tag,Tooltip} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import {getImageUrl, NoneData, sortDirections} from 'educoder'; import {getImageUrl, NoneData, sortDirections} from 'educoder';

@ -1,4 +1,4 @@
import React,{Component} from "React"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import { WordsBtn,markdownToHTML,AttachmentList} from 'educoder'; import { WordsBtn,markdownToHTML,AttachmentList} from 'educoder';

@ -26,7 +26,7 @@ const buildColumns = (that,isParent) => {
let showSorter = isParent==true let showSorter = isParent==true
const courseId = that.props.match.params.coursesId const courseId = that.props.match.params.coursesId
const columns=[{ const columns=[{
title: '序号1', title: '序号',
dataIndex: 'id', dataIndex: 'id',
key: 'id', key: 'id',
align:'center', align:'center',

@ -1,4 +1,4 @@
import React, {Component} from "React"; import React, {Component} from "react";
import {Form, Select, Input, Button, Checkbox, DatePicker,Spin,Icon,AutoComplete,InputNumber,Breadcrumb} from "antd"; import {Form, Select, Input, Button, Checkbox, DatePicker,Spin,Icon,AutoComplete,InputNumber,Breadcrumb} from "antd";
import ApplyForAddOrgModal from '../../user/modal/ApplyForAddOrgModal'; import ApplyForAddOrgModal from '../../user/modal/ApplyForAddOrgModal';
import axios from 'axios'; import axios from 'axios';

@ -1,4 +1,4 @@
import React, {Component} from "React"; import React, {Component} from "react";
import {Form, Select, Input, Button, Checkbox, DatePicker,Spin,Icon,AutoComplete,InputNumber,Breadcrumb} from "antd"; import {Form, Select, Input, Button, Checkbox, DatePicker,Spin,Icon,AutoComplete,InputNumber,Breadcrumb} from "antd";
import ApplyForAddOrgModal from '../../user/modal/ApplyForAddOrgModal'; import ApplyForAddOrgModal from '../../user/modal/ApplyForAddOrgModal';
import axios from 'axios'; import axios from 'axios';

@ -1,4 +1,4 @@
import React,{Component} from "React"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,DatePicker} from "antd"; import { Form, Select, Input, Button,Checkbox,DatePicker} from "antd";
import locale from 'antd/lib/date-picker/locale/zh_CN'; import locale from 'antd/lib/date-picker/locale/zh_CN';

Loading…
Cancel
Save