Merge branch 'chromesetting' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_tpm_ui
杨树林 5 years ago
commit cd8f5e1df8

@ -460,6 +460,9 @@ class App extends Component {
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);

@ -706,6 +706,28 @@ submittojoinclass=(value)=>{
}
getAppdata=()=>{
try {
var chromesettingArray = JSON.parse(localStorage.getItem('chromesetting'));
var chromesettingresponseArray = JSON.parse(localStorage.getItem('chromesettingresponse'));
// console.log("NewHeaderNewHeaderNewHeader");
// console.log(chromesettingArray);
// console.log(chromesettingresponseArray);
this.setState({
mygetHelmetapi2:chromesettingArray
});
if (chromesettingArray.tab_logo_url) {
this.gettablogourldata(chromesettingresponseArray);
} else {
this.gettablogourlnull();
}
}catch (e) {
console.log("head获取游览器配置失败 重新请求开始读取配置");
this.geturlsdata();
}
};
geturlsdata=()=>{
let url = "/setting.json";
axios.get(url).then((response) => {
// console.log("app.js开始请求/setting.json");
@ -715,6 +737,8 @@ submittojoinclass=(value)=>{
this.setState({
mygetHelmetapi2: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);
@ -741,7 +765,7 @@ submittojoinclass=(value)=>{
this.gettablogourlnull();
});
};
}
matchpaths=(url)=>{

@ -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
*/

Loading…
Cancel
Save