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

dev_forum
hjm 5 years ago
commit ec268b147d

@ -4,6 +4,7 @@ import axios from 'axios';
import {getImageUrl, trigger, on, off} from 'educoder';
import { Tooltip, message,Popover} from 'antd';
import CoursesListType from '../coursesPublic/CoursesListType';
import AccountProfile from"../../user/AccountProfile";
import Addcourses from '../coursesPublic/Addcourses';
import '../css/Courses.css';
import Modals from "../../modals/Modals";
@ -88,6 +89,13 @@ class CoursesBanner extends Component {
}
tojoinclass = (val) => {
if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({
AccountProfiletype:true
})
return
}
if (val === 1) {
this.setState({
Addcoursestypes: true,
@ -326,8 +334,16 @@ class CoursesBanner extends Component {
postsettings=()=>{
window.location.href = "/courses/" + this.props.match.params.coursesId + "/settings";
}
hideAccountProfile=()=>{
this.setState({
AccountProfiletype:false
})
}
render() {
let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,is_guide} = this.state;
let { Addcoursestypes, coursedata, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,is_guide,AccountProfiletype} = this.state;
return (
<div>
@ -335,6 +351,13 @@ class CoursesBanner extends Component {
is_guide && <Guide></Guide>
}
{AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.state}
{...this.props}
/>:""}
{
coursedata === undefined || coursedata.status===401? <div id="course_info_1309" className="courseHead" style={{height: '206px'}}></div>:<div id="course_info_1309" className="courseHead" style={{height: '206px'}}>

@ -23,7 +23,8 @@ import {
Radio,
Tooltip,
notification,
Pagination
Pagination,
Spin,
} from "antd";
import {Link, Switch, Route, Redirect} from 'react-router-dom';
import axios from 'axios';
@ -653,7 +654,7 @@ class ShixunStudentWork extends Component {
)
}
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
return (
<div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
{this.state.showmodel===true?<ShixunWorkModal
@ -716,11 +717,16 @@ class ShixunStudentWork extends Component {
color:rgba(255,104,0,1);
}
.shixunSpin{
color:#FF6801;
margin-right: 10px;
}
`}
</style>
<li className="clearfix startbox mb20" style={{display:duplicatechecking===true?"":"none"}}>
<Spin indicator={antIcon} spinning={duplicatechecking} className={"shixunSpin"}/>
<span className={"startfont"}>
正在执行查重请稍后刷新页面查看结果 温馨提示执行时间因查重作品数以及作品的代码量而异
正在执行查重完成后将为您自动刷新结果 温馨提示执行时间因查重作品数以及作品的代码量而异
</span>
</li>

@ -367,10 +367,7 @@ class LoginDialog extends Component {
description:response.data.message,
});
}else{
if(response.data.profile_completed !== null || response.data.profile_completed === false){
this.setMyEduCoderModals();
return;
}
broadcastChannelPostMessage('refreshPage')
this.setState({

@ -1,14 +1,14 @@
import React, { Component } from 'react';
import {getImageUrl} from 'educoder';
import {Tooltip,Modal,Icon,Spin,message} from 'antd';
import '../../paths/ShixunPaths.css';
import DetailCardsEditAndAdd from './DetailCardsEditAndAdd';
import DetailCardsEditAndEdit from './DetailCardsEditAndEdit';
import AccountProfile from"../../user/AccountProfile";
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import axios from 'axios';
import { DragDropContext , Draggable, Droppable} from 'react-beautiful-dnd';
import Modals from '../../modals/Modals';
import '../../paths/ShixunPaths.css';
const $ = window.$
//
// //a little function to help us with reordering the result
@ -193,7 +193,12 @@ class DetailCards extends Component{
}
startgameid=(id)=>{
if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({
AccountProfiletype:true
})
return
}
let url = "/shixuns/" + id + "/shixun_exec.json";
axios.get(url).then((response) => {
@ -292,10 +297,16 @@ class DetailCards extends Component{
startshixunCombattype:false
})
}
render(){
hideAccountProfile=()=>{
this.setState({
AccountProfiletype:false
})
}
render(){
let { pathCardsList,
dropid,
dropidtype,
AccountProfiletype,
idsum,
pathCardsedittype,
pathlistedit,
@ -317,6 +328,12 @@ class DetailCards extends Component{
return(
<div>
{AccountProfiletype===true?<AccountProfile
hideAccountProfile={()=>this.hideAccountProfile()}
{...this.state}
{...this.props}
/>:""}
<Modals
modalsType={Modalstype}
modalsTopval={Modalstopval}

@ -182,7 +182,15 @@ class NewHeader extends Component {
})
return;
}
this.setState({
if(user&&user.profile_completed===false){
this.setState({
AccountProfiletype:true
})
return;
}
this.setState({
Addcoursestypes:true,
})
}
@ -201,7 +209,15 @@ class NewHeader extends Component {
})
return;
}
this.setState({
if(user&&user.profile_completed===false){
this.setState({
AccountProfiletype:true
})
return;
}
this.setState({
tojoinitemtype:true
})
}

@ -340,10 +340,10 @@ class LoginRegisterComponent extends Component {
}
if(response.data.profile_completed !== null || response.data.profile_completed === false){
this.setMyEduCoderModals();
return;
}
// if(response.data.profile_completed !== null || response.data.profile_completed === false){
// this.setMyEduCoderModals();
// return;
// }
if (response.status === 200) {
if (response.data.status === 402) {
@ -458,13 +458,13 @@ class LoginRegisterComponent extends Component {
return;
}
}else {
this.setState({
logins: "",
dragOk: false,
codes: "",
passwords: "",
Agreetotheterms: "",
})
// this.setState({
// logins: "",
// dragOk: false,
// codes: "",
// passwords: "",
// Agreetotheterms: "",
// })
this.setMyEduCoderModals();
}
}
@ -1038,10 +1038,10 @@ class LoginRegisterComponent extends Component {
: <div style={{height:"25px"}}></div>
}
<Notcompletedysl
{this.state.MyEduCoderModals===true? <Notcompletedysl
modalsType={this.state.MyEduCoderModals}
setNotcompleteds={()=>{this.setNotcompleteds()}}
/>
/>:""}
{
Whethertoverify===false&&pciphone===true?

@ -16,19 +16,19 @@ class Notcompletedysl extends Component {
// console.log("Notcompletedysl");
// console.log("开发了402了");
axios.interceptors.response.use((response) => {
// console.log(response);
if (response != undefined)
if (response && response.data.status === 402) {
this.setState({
modalsType: true
})
}
return response;
}, (error) => {
//TODO 这里如果样式变了会出现css不加载的情况
});
// axios.interceptors.response.use((response) => {
// // console.log(response);
// if (response != undefined)
// if (response && response.data.status === 402) {
// this.setState({
// modalsType: true
// })
// }
// return response;
// }, (error) => {
// //TODO 这里如果样式变了会出现css不加载的情况
//
// });
}
@ -55,7 +55,7 @@ class Notcompletedysl extends Component {
destroyOnClose={true}
title="提示"
centered={true}
visible={this.state.modalsType}
visible={this.props.modalsType}
width="530px"
>
<div className="educouddiv">

Loading…
Cancel
Save