|
|
|
@ -315,6 +315,27 @@ export function TPMIndexHOC(WrappedComponent) {
|
|
|
|
|
}
|
|
|
|
|
//获取当前定制信息
|
|
|
|
|
getAppdata = () => {
|
|
|
|
|
try {
|
|
|
|
|
var chromesettingArray = JSON.parse(localStorage.getItem('chromesetting'));
|
|
|
|
|
var chromesettingresponseArray = JSON.parse(localStorage.getItem('chromesettingresponse'));
|
|
|
|
|
// console.log("TPMLNdexHOC");
|
|
|
|
|
// console.log(chromesettingArray);
|
|
|
|
|
// console.log(chromesettingresponseArray);
|
|
|
|
|
this.setState({
|
|
|
|
|
mygetHelmetapi:chromesettingArray
|
|
|
|
|
});
|
|
|
|
|
if (chromesettingArray.tab_logo_url) {
|
|
|
|
|
this.gettablogourldata(chromesettingresponseArray);
|
|
|
|
|
} else {
|
|
|
|
|
this.gettablogourlnull();
|
|
|
|
|
}
|
|
|
|
|
}catch (e) {
|
|
|
|
|
console.log("hoc获取游览器配置失败 重新请求开始读取配置");
|
|
|
|
|
this.getAppdatausr();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
getAppdatausr=()=>{
|
|
|
|
|
let url = "/setting.json";
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
// console.log("app.js开始请求/setting.json");
|
|
|
|
@ -324,6 +345,8 @@ export function TPMIndexHOC(WrappedComponent) {
|
|
|
|
|
this.setState({
|
|
|
|
|
mygetHelmetapi: response.data.setting
|
|
|
|
|
});
|
|
|
|
|
localStorage.setItem('chromesetting',JSON.stringify(response.data.setting));
|
|
|
|
|
localStorage.setItem('chromesettingresponse',JSON.stringify(response));
|
|
|
|
|
try {
|
|
|
|
|
if (response.data.setting.tab_logo_url) {
|
|
|
|
|
this.gettablogourldata(response);
|
|
|
|
@ -350,7 +373,8 @@ export function TPMIndexHOC(WrappedComponent) {
|
|
|
|
|
this.gettablogourlnull();
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
课堂权限相关方法,暂时写这里了 ----------------------------------------END
|
|
|
|
|
*/
|
|
|
|
|