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.
/.bundle
# Ignore lock config file
*.lock
*.log
# mac
*.DS_Store

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

@ -26,7 +26,7 @@ const buildColumns = (that,isParent) => {
let showSorter = isParent==true
const courseId = that.props.match.params.coursesId
const columns=[{
title: '序号1',
title: '序号',
dataIndex: 'id',
key: 'id',
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 ApplyForAddOrgModal from '../../user/modal/ApplyForAddOrgModal';
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 ApplyForAddOrgModal from '../../user/modal/ApplyForAddOrgModal';
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 locale from 'antd/lib/date-picker/locale/zh_CN';

Loading…
Cancel
Save