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) {
|
||||
initOnlineOfflineListener();
|
||||
var proxy = "http://localhost:3000";
|
||||
proxy = "https://testforgeplus.trustie.net";
|
||||
proxy = "http://192.168.1.37:3000";
|
||||
|
||||
const requestMap = {};
|
||||
window.setfalseInRequestMap = function (keyName) {
|
||||
|
|
|
@ -403,39 +403,13 @@ class NewHeader extends Component {
|
|||
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 = () => {
|
||||
let url = "/setting.json";
|
||||
axios.get(url).then((response) => {
|
||||
if (response && response.data) {
|
||||
this.setState({ settings: 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);
|
||||
} else {
|
||||
this.gettablogourlnull();
|
||||
}
|
||||
} catch (e) {
|
||||
this.gettablogourlnull();
|
||||
if (response.data.setting.tab_logo_url) {
|
||||
this.gettablogourldata(response);
|
||||
}
|
||||
} else {
|
||||
this.gettablogourlnull();
|
||||
|
|
Loading…
Reference in New Issue