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 {getImageUrl, trigger, on, off} from 'educoder';
import { Tooltip, message,Popover} from 'antd'; import { Tooltip, message,Popover} from 'antd';
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
import AccountProfile from"../../user/AccountProfile";
import Addcourses from '../coursesPublic/Addcourses'; import Addcourses from '../coursesPublic/Addcourses';
import '../css/Courses.css'; import '../css/Courses.css';
import Modals from "../../modals/Modals"; import Modals from "../../modals/Modals";
@ -88,6 +89,13 @@ class CoursesBanner extends Component {
} }
tojoinclass = (val) => { tojoinclass = (val) => {
if(this.props.current_user&&this.props.current_user.profile_completed===false){
this.setState({
AccountProfiletype:true
})
return
}
if (val === 1) { if (val === 1) {
this.setState({ this.setState({
Addcoursestypes: true, Addcoursestypes: true,
@ -326,15 +334,30 @@ class CoursesBanner extends Component {
postsettings=()=>{ postsettings=()=>{
window.location.href = "/courses/" + this.props.match.params.coursesId + "/settings"; window.location.href = "/courses/" + this.props.match.params.coursesId + "/settings";
} }
hideAccountProfile=()=>{
this.setState({
AccountProfiletype:false
})
}
render() { 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 ( return (
<div> <div>
{ {
is_guide && <Guide></Guide> 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'}}> 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, Radio,
Tooltip, Tooltip,
notification, notification,
Pagination Pagination,
Spin,
} from "antd"; } from "antd";
import {Link, Switch, Route, Redirect} from 'react-router-dom'; import {Link, Switch, Route, Redirect} from 'react-router-dom';
import axios from 'axios'; import axios from 'axios';
@ -653,7 +654,7 @@ class ShixunStudentWork extends Component {
) )
} }
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
return ( return (
<div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}> <div className=" clearfix " style={{margin: "auto" , minWidth:"1200px"}}>
{this.state.showmodel===true?<ShixunWorkModal {this.state.showmodel===true?<ShixunWorkModal
@ -716,11 +717,16 @@ class ShixunStudentWork extends Component {
color:rgba(255,104,0,1); color:rgba(255,104,0,1);
} }
.shixunSpin{
color:#FF6801;
margin-right: 10px;
}
`} `}
</style> </style>
<li className="clearfix startbox mb20" style={{display:duplicatechecking===true?"":"none"}}> <li className="clearfix startbox mb20" style={{display:duplicatechecking===true?"":"none"}}>
<Spin indicator={antIcon} spinning={duplicatechecking} className={"shixunSpin"}/>
<span className={"startfont"}> <span className={"startfont"}>
正在执行查重请稍后刷新页面查看结果 温馨提示执行时间因查重作品数以及作品的代码量而异 正在执行查重完成后将为您自动刷新结果 温馨提示执行时间因查重作品数以及作品的代码量而异
</span> </span>
</li> </li>

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

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

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

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

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

Loading…
Cancel
Save