forked from Gitlink/forgeplus-react
重置settings为undefined
This commit is contained in:
parent
ecb1691b4d
commit
c554d2c00d
|
@ -56,7 +56,7 @@ window._debugType = debugType;
|
||||||
export function initAxiosInterceptors(props) {
|
export function initAxiosInterceptors(props) {
|
||||||
initOnlineOfflineListener();
|
initOnlineOfflineListener();
|
||||||
var proxy = "http://localhost:3000";
|
var proxy = "http://localhost:3000";
|
||||||
proxy = "https://testforgeplus.trustie.net";
|
proxy = "http://192.168.1.37:3000";
|
||||||
|
|
||||||
const requestMap = {};
|
const requestMap = {};
|
||||||
window.setfalseInRequestMap = function (keyName) {
|
window.setfalseInRequestMap = function (keyName) {
|
||||||
|
|
|
@ -403,39 +403,13 @@ class NewHeader extends Component {
|
||||||
visiblemyss: boll,
|
visiblemyss: boll,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
getAppdata = () => {
|
|
||||||
try {
|
|
||||||
var chromesettingArray = JSON.parse(localStorage.getItem('chromesetting'));
|
|
||||||
var chromesettingresponseArray = JSON.parse(localStorage.getItem('chromesettingresponse'));
|
|
||||||
this.setState({
|
|
||||||
settings: chromesettingArray
|
|
||||||
});
|
|
||||||
if (chromesettingArray.tab_logo_url) {
|
|
||||||
this.gettablogourldata(chromesettingresponseArray);
|
|
||||||
} else {
|
|
||||||
this.gettablogourlnull();
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
this.geturlsdata();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
geturlsdata = () => {
|
geturlsdata = () => {
|
||||||
let url = "/setting.json";
|
let url = "/setting.json";
|
||||||
axios.get(url).then((response) => {
|
axios.get(url).then((response) => {
|
||||||
if (response && response.data) {
|
if (response && response.data) {
|
||||||
this.setState({ settings: response.data.setting });
|
this.setState({ settings: response.data.setting });
|
||||||
// localStorage.setItem('chromesetting', JSON.stringify(response.data.setting));
|
if (response.data.setting.tab_logo_url) {
|
||||||
// localStorage.setItem('chromesettingresponse', JSON.stringify(response));
|
this.gettablogourldata(response);
|
||||||
try {
|
|
||||||
if (response.data.setting.tab_logo_url) {
|
|
||||||
this.gettablogourldata(response);
|
|
||||||
} else {
|
|
||||||
this.gettablogourlnull();
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
this.gettablogourlnull();
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.gettablogourlnull();
|
this.gettablogourlnull();
|
||||||
|
|
Loading…
Reference in New Issue