diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index cc3646b9d..afe7b606a 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -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,15 +334,30 @@ 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 (
{ is_guide && } - + + {AccountProfiletype===true?this.hideAccountProfile()} + {...this.state} + {...this.props} + />:""} + + { coursedata === undefined || coursedata.status===401?
:
diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js index 0c808e01d..4bb44b697 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js @@ -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 = ; return (
{this.state.showmodel===true?
  • + - 正在执行查重,请稍后刷新页面查看结果 温馨提示:执行时间因查重作品数以及作品的代码量而异 + 正在执行查重,完成后将为您自动刷新结果。 温馨提示:执行时间因查重作品数以及作品的代码量而异
  • diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index a4dee4b4c..50038366d 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -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({ diff --git a/public/react/src/modules/paths/PathDetail/DetailCards.js b/public/react/src/modules/paths/PathDetail/DetailCards.js index fc75961ec..19894e856 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCards.js +++ b/public/react/src/modules/paths/PathDetail/DetailCards.js @@ -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(
    + {AccountProfiletype===true?this.hideAccountProfile()} + {...this.state} + {...this.props} + />:""} +
    } - {this.setNotcompleteds()}} - /> + />:""} { Whethertoverify===false&&pciphone===true? diff --git a/public/react/src/modules/user/Notcompletedysl.js b/public/react/src/modules/user/Notcompletedysl.js index f9c260209..fc70f838e 100644 --- a/public/react/src/modules/user/Notcompletedysl.js +++ b/public/react/src/modules/user/Notcompletedysl.js @@ -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" >