|
|
|
@ -7,8 +7,8 @@ import NewFooter from './NewFooter'
|
|
|
|
|
import SiderBar from './SiderBar'
|
|
|
|
|
import { getUrl, downloadFile } from 'educoder'
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import { Spin } from 'antd'
|
|
|
|
|
import './TPMIndex.css'
|
|
|
|
|
import { Spin } from 'antd';
|
|
|
|
|
import './TPMIndex.css';
|
|
|
|
|
import LoginDialog from '../login/LoginDialog';
|
|
|
|
|
import AccountProfile from '../user/AccountProfile';
|
|
|
|
|
|
|
|
|
@ -83,7 +83,8 @@ export function TPMIndexHOC(WrappedComponent) {
|
|
|
|
|
|
|
|
|
|
globalLoading: false,
|
|
|
|
|
dataquerys:{},
|
|
|
|
|
isloginCancel:undefined
|
|
|
|
|
isloginCancel:undefined,
|
|
|
|
|
mygetHelmetapi:undefined,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -147,6 +148,8 @@ export function TPMIndexHOC(WrappedComponent) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
console.log("TPMIndexHOC========");
|
|
|
|
|
console.log(this.props);
|
|
|
|
|
window.addEventListener('keyup', this.keyupListener)
|
|
|
|
|
|
|
|
|
|
if(this.props.match.path==="/"){
|
|
|
|
@ -207,7 +210,7 @@ export function TPMIndexHOC(WrappedComponent) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.getAppdata();
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
课堂权限相关方法,暂时写这里了 ----------------------------------------START
|
|
|
|
@ -277,7 +280,32 @@ export function TPMIndexHOC(WrappedComponent) {
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
//获取当前定制信息
|
|
|
|
|
getAppdata=()=>{
|
|
|
|
|
let url = "/setting.json";
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
if(response){
|
|
|
|
|
this.setState({
|
|
|
|
|
mygetHelmetapi:response.data.setting,
|
|
|
|
|
});
|
|
|
|
|
// console.log("获取当前定制信息");
|
|
|
|
|
// console.log(response.data.setting);
|
|
|
|
|
document.title = response.data.setting.name;
|
|
|
|
|
var link = document.createElement('link'),
|
|
|
|
|
oldLink = document.getElementById('dynamic-favicon');
|
|
|
|
|
link.id = 'dynamic-favicon';
|
|
|
|
|
link.rel = 'shortcut icon';
|
|
|
|
|
link.href = response.data.setting.nav_logo_url;
|
|
|
|
|
if (oldLink) {
|
|
|
|
|
document.head.removeChild(oldLink);
|
|
|
|
|
}
|
|
|
|
|
document.head.appendChild(link);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/**
|
|
|
|
|
课堂权限相关方法,暂时写这里了 ----------------------------------------END
|
|
|
|
|
*/
|
|
|
|
@ -534,6 +562,19 @@ export function TPMIndexHOC(WrappedComponent) {
|
|
|
|
|
hideGlobalLoading = () => {
|
|
|
|
|
this.setState({ globalLoading: false })
|
|
|
|
|
}
|
|
|
|
|
getAppdata=()=>{
|
|
|
|
|
let url = "/setting.json";
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
if(response){
|
|
|
|
|
this.setState({
|
|
|
|
|
getHelmetapi:response.data.setting
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
render() {
|
|
|
|
|
let{Headertop,Footerdown, isRender, AccountProfiletype}=this.state;
|
|
|
|
|
const common = {
|
|
|
|
@ -569,10 +610,12 @@ export function TPMIndexHOC(WrappedComponent) {
|
|
|
|
|
yslslowCheckresults:this.yslslowCheckresults,
|
|
|
|
|
yslslowCheckresultsNo:this.yslslowCheckresultsNo,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
// console.log("this.props.getHelmetapi");
|
|
|
|
|
// console.log(this.props.getHelmetapi);
|
|
|
|
|
return (
|
|
|
|
|
<div className="indexHOC">
|
|
|
|
|
{isRender===true ? <LoginDialog
|
|
|
|
|
{isRender===true ? <LoginDialog
|
|
|
|
|
Modifyloginvalue={()=>this.hideLoginDialog()}
|
|
|
|
|
{...this.props}
|
|
|
|
|
{...this.state}
|
|
|
|
|