实训调整

dev_cxt
杨树明 5 years ago
parent faf41800d1
commit 893c4840f7

@ -58,15 +58,6 @@ class TPMBanner extends Component {
} }
} }
// star_info:[0, 0, 0, 0, 0, 0],
// star_infos:[0, 0, 0, 0, 0, 0],
// shixunsDetails:{},
// shixunId: undefined,
// componentWillReceiveProps(newProps, newContext){
// this.setState({
// shixunsDetails: newProps.shixunsDetails
// });
// }
IEVersion = () => { IEVersion = () => {
var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串 var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
@ -141,8 +132,11 @@ class TPMBanner extends Component {
}) })
} }
} }
} }
} }
componentDidMount() { componentDidMount() {
let thiisie = this.IEVersion(); let thiisie = this.IEVersion();
@ -155,6 +149,7 @@ class TPMBanner extends Component {
isIE: false isIE: false
}) })
} }
} }
/* /*
@ -784,7 +779,8 @@ class TPMBanner extends Component {
}; };
// //
// console.log(this.props.shixunsDetails&&this.props.shixunsDetails.is_jupyter) // console.log(this.props.shixunsDetails&&this.props.shixunsDetails.is_jupyter)
console.log(this.props)
console.log(this.state)
return ( return (
shixunsDetails === undefined ? "" : shixunsDetails === undefined ? "" :

@ -207,6 +207,7 @@ class TPMIndex extends Component {
propaedeutics:response.data.propaedeutics, propaedeutics:response.data.propaedeutics,
status: response.data.shixun_status, status: response.data.shixun_status,
secret_repository: response.data.secret_repository, secret_repository: response.data.secret_repository,
public:response.data.public,
is_jupyter:response.data.is_jupyter=== undefined||response.data.is_jupyter===null?false:response.data.is_jupyter, is_jupyter:response.data.is_jupyter=== undefined||response.data.is_jupyter===null?false:response.data.is_jupyter,
}); });
@ -295,10 +296,6 @@ class TPMIndex extends Component {
// this.getnavdatas() // this.getnavdatas()
} }
// componentDidUpdate=()=>{
// this.getnavdatas()
// }
setLoadingContent = (isLoadingContent) => { setLoadingContent = (isLoadingContent) => {
this.setState({ loadingContent: isLoadingContent }) this.setState({ loadingContent: isLoadingContent })
} }
@ -307,9 +304,6 @@ class TPMIndex extends Component {
getnavdatas=()=>{ getnavdatas=()=>{
let selectedKeys; let selectedKeys;
const {location} = this.props; const {location} = this.props;
console.log(location.pathname)
if(location.pathname.indexOf('/challenges')!=-1){ if(location.pathname.indexOf('/challenges')!=-1){
selectedKeys="1" selectedKeys="1"
}else if(location.pathname.indexOf('/propaedeutics')!=-1){ }else if(location.pathname.indexOf('/propaedeutics')!=-1){

Loading…
Cancel
Save