|
|
@ -285,9 +285,14 @@ export function TPMIndexHOC(WrappedComponent) {
|
|
|
|
//获取当前定制信息
|
|
|
|
//获取当前定制信息
|
|
|
|
getAppdata=()=>{
|
|
|
|
getAppdata=()=>{
|
|
|
|
let url = "/setting.json";
|
|
|
|
let url = "/setting.json";
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
axios.get(url,{
|
|
|
|
if(response){
|
|
|
|
|
|
|
|
if(response.data){
|
|
|
|
}).then((response) => {
|
|
|
|
|
|
|
|
console.log("开始请求/setting.json");
|
|
|
|
|
|
|
|
console.log("获取当前定制信息");
|
|
|
|
|
|
|
|
console.log(response);
|
|
|
|
|
|
|
|
if(response!=undefined){
|
|
|
|
|
|
|
|
if(response.status===200){
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
mygetHelmetapi:response.data.setting
|
|
|
|
mygetHelmetapi:response.data.setting
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -301,7 +306,7 @@ export function TPMIndexHOC(WrappedComponent) {
|
|
|
|
document.head.removeChild(oldLink);
|
|
|
|
document.head.removeChild(oldLink);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
document.head.appendChild(link);
|
|
|
|
document.head.appendChild(link);
|
|
|
|
}else {
|
|
|
|
}else{
|
|
|
|
document.title = "EduCoder";
|
|
|
|
document.title = "EduCoder";
|
|
|
|
var link = document.createElement('link'),
|
|
|
|
var link = document.createElement('link'),
|
|
|
|
oldLink = document.getElementById('dynamic-favicon');
|
|
|
|
oldLink = document.getElementById('dynamic-favicon');
|
|
|
@ -313,7 +318,6 @@ export function TPMIndexHOC(WrappedComponent) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
document.head.appendChild(link);
|
|
|
|
document.head.appendChild(link);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
document.title = "EduCoder";
|
|
|
|
document.title = "EduCoder";
|
|
|
|
var link = document.createElement('link'),
|
|
|
|
var link = document.createElement('link'),
|
|
|
@ -328,6 +332,7 @@ export function TPMIndexHOC(WrappedComponent) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
console.log(error);
|
|
|
|
document.title = "EduCoder";
|
|
|
|
document.title = "EduCoder";
|
|
|
|
var link = document.createElement('link'),
|
|
|
|
var link = document.createElement('link'),
|
|
|
|
oldLink = document.getElementById('dynamic-favicon');
|
|
|
|
oldLink = document.getElementById('dynamic-favicon');
|
|
|
|