diff --git a/public/react/src/App.js b/public/react/src/App.js index 191b0f0c8..49dac07cd 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -18,6 +18,9 @@ import Notcompletedysl from './modules/user/Notcompletedysl'; import Trialapplicationysl from './modules/login/Trialapplicationysl'; import Trialapplicationreview from './modules/user/Trialapplicationreview'; import Addcourses from "./modules/courses/coursesPublic/Addcourses"; +import AccountProfile from"./modules/user/AccountProfile"; + + import Trialapplication from './modules/login/Trialapplication' import NotFoundPage from './NotFoundPage' @@ -278,6 +281,7 @@ class App extends Component { + {/*{*/} {/* isRender === true?*/} {/* : ""*/} diff --git a/public/react/src/modules/courses/coursesPublic/Addcourses.js b/public/react/src/modules/courses/coursesPublic/Addcourses.js index 922c68650..8225907b8 100644 --- a/public/react/src/modules/courses/coursesPublic/Addcourses.js +++ b/public/react/src/modules/courses/coursesPublic/Addcourses.js @@ -38,7 +38,6 @@ class Addcourses extends Component{ } return response; }, (error) => { - //TODO 这里如果样式变了会出现css不加载的情况 }); diff --git a/public/react/src/modules/courses/css/Courses.css b/public/react/src/modules/courses/css/Courses.css index e214bd81d..f8d0ec76c 100644 --- a/public/react/src/modules/courses/css/Courses.css +++ b/public/react/src/modules/courses/css/Courses.css @@ -1560,9 +1560,28 @@ input.ant-input-number-input:focus { border-radius: 5px; } -.ant-modal-wrap{ - overflow: hidden; +@media screen and (min-width: 1400px) { + .ant-modal-wrap{ + overflow: hidden; + } +} +/* 设置了浏览器宽度不小于1201px时 abc 显示1200px宽度 */ + +@media screen and (max-width: 1400px) { + +} +/* 设置了浏览器宽度不大于1200px时 abc 显示900px宽度 */ + +@media screen and (max-width: 900px) { + +} +/* 设置了浏览器宽度不大于900px时 abc 显示200px宽度 */ + +@media screen and (max-width: 500px) { + } +/* 设置了浏览器宽度不大于500px时 abc 显示100px宽度 */ + /* 试卷答题 */ .stageTable .ant-table-tbody tr:last-child td,.stageTable .ant-table-thead > tr > th{ diff --git a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js index 912302cb8..2d7bcc0e0 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js +++ b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js @@ -466,7 +466,7 @@ class DetailCardsEditAndAdd extends Component{ {ChooseShixunList && ChooseShixunList.shixuns_count} 个实训 -
+
{ChooseShixunList && ChooseShixunList.shixuns_count} 个实训 -
+
{ } //头部获取是否已经登录了 getUser=(url)=>{ - console.log("点击了503") - console.log(url); + // console.log("点击了503") + // console.log(url); let{user} =this.state; + if(user===undefined){ this.setState({ isRender:true }) return } + if(user&&user.login===""){ this.setState({ isRender:true }) return; } + + if(user&&user.profile_completed===false){ + this.setState({ + AccountProfiletype:true + }) + return; + } + if(url !== undefined || url!==""){ window.location.href = url; } + + } //修改登录方法 @@ -554,6 +566,12 @@ submittojoinclass=(value)=>{ }) } + hideAccountProfile=()=>{ + this.setState({ + AccountProfiletype:false + }) + } + render() { const isLogin = true; // 这里不会出现未登录的情况,服务端在服务端路由时发现如果是未登录,则跳转到登录页了。 const {match ,} = this.props; @@ -568,7 +586,7 @@ submittojoinclass=(value)=>{ Checkboxteachingtype, code_notice, checked_notice, - RadioGroupvalue, + AccountProfiletype, submitapplications, submitapplicationsvalue, user, @@ -610,6 +628,12 @@ submittojoinclass=(value)=>{ {...this.props} />:""} + {AccountProfiletype===true?this.hideAccountProfile()} + {...this.state} + {...this.props} + />:""} +
{/*<%= link_to image_tag("/images/educoder/logo.png", alt:"高校智能化教学与实训平台", className:"logoimg"), home_path %>*/} diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index 5efadc1d1..33dc7fc5b 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -8,6 +8,8 @@ import PropTypes from 'prop-types'; import {Modal,Input,Radio,Pagination,message,Spin,Icon,Tooltip} from 'antd'; +import AccountProfile from"../user/AccountProfile"; + import 'antd/lib/pagination/style/index.css'; import axios from 'axios' @@ -381,6 +383,14 @@ class TPMBanner extends Component { //开始实战按钮 startshixunCombat=(id, reset)=>{ + + if(this.props.current_user&&this.props.current_user.profile_completed===false){ + this.setState({ + AccountProfiletype:true + }) + return + } + let {shixunsDetails} = this.props if( shixunsDetails.shixun_status>1){ this.setState({ @@ -455,7 +465,11 @@ class TPMBanner extends Component { }) } - + hideAccountProfile=()=>{ + this.setState({ + AccountProfiletype:false + }) + } render() { let { @@ -480,7 +494,7 @@ class TPMBanner extends Component { shixunsreplace, hidestartshixunsreplacevalue, Forkvisibletype, - Senttothevcaluetype, + AccountProfiletype, isIE} = this.state; let {shixunsDetails, shixunId, star_info, star_infos} = this.props; let challengeBtnTipText = ''; @@ -555,6 +569,13 @@ class TPMBanner extends Component {
+ {AccountProfiletype===true?this.hideAccountProfile()} + {...this.state} + {...this.props} + />:""} + + {this.state.Modalstype===true? { - + if(this.props.current_user&&this.props.current_user.profile_completed===false){ + this.setState({ + AccountProfiletype:true + }) + return + } + + debugger let { ChallengesDataList } = this.state; // let id = this.props.match.params.shixunId; this.setState({ @@ -271,8 +280,15 @@ class Challenges extends Component { startshixunCombattype:false }) } + + hideAccountProfile=()=>{ + this.setState({ + AccountProfiletype:false + }) + } + render() { - let { ChallengesDataList, startbtns, sumidtype ,startshixunCombattype,shixunsreplace,shixunsmessage,hidestartshixunsreplacevalue,operationstrue} = this.state; + let { ChallengesDataList, startbtns, sumidtype ,startshixunCombattype,shixunsreplace,shixunsmessage,hidestartshixunsreplacevalue,operationstrue,AccountProfiletype} = this.state; let { loadingContent } = this.props; if (ChallengesDataList != undefined) { this.updatamakedown("ReactMarkdown") @@ -281,6 +297,12 @@ class Challenges extends Component { const antIcon = ; return ( + {AccountProfiletype===true?this.hideAccountProfile()} + {...this.state} + {...this.props} + />:""} + {loadingContent ? { + if (response != undefined) + if (response && response.data.status === 402) { + this.setState({ + AccountProfiletype: true + }) + + } + return response; + }, (error) => { + + }); + + } + + gotoback=()=>{ + if(this.props.AccountProfiletype!=undefined){ + this.setState({ + AccountProfiletype:false + }) + this.props.hideAccountProfile() + }else{ + window.location.href="/"; + this.setState({ + AccountProfiletype:false + }) + } + } + + + +render() { + return( + + + + ) + } +} + +export default AccountProfile; \ No newline at end of file