|
|
@@ -140,18 +140,18 @@ const parseBlocks=(data)=>{
|
|
|
const getFavorites=(data)=>{
|
|
|
let favorites=[];
|
|
|
if (data!=null){
|
|
|
- let arr=data.split(",");
|
|
|
- if (arr){
|
|
|
- for (let i = 0; i < arr.length; i++) {
|
|
|
- favorites.push(parseInt(arr[i]));
|
|
|
- }
|
|
|
- }
|
|
|
- localStorageSet(LOCAL_FAVO_IDS,JSON.stringify(favorites));
|
|
|
+ // let arr=data.split(",");
|
|
|
+ // if (arr){
|
|
|
+ // for (let i = 0; i < arr.length; i++) {
|
|
|
+ // favorites.push(parseInt(arr[i]));
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // localStorageSet(LOCAL_FAVO_IDS,JSON.stringify(favorites));
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- let localFavorites=localStorageGet(LOCAL_FAVO_IDS,"");
|
|
|
- if (localFavorites!=="")favorites=JSON.parse(localFavorites)
|
|
|
+ // let localFavorites=localStorageGet(LOCAL_FAVO_IDS,"");
|
|
|
+ // if (localFavorites!=="")favorites=JSON.parse(localFavorites)
|
|
|
}
|
|
|
return favorites;
|
|
|
}
|
|
|
@@ -187,8 +187,8 @@ const reducerRoutes=(state,action)=>{
|
|
|
}
|
|
|
}
|
|
|
//favorites
|
|
|
- let favorites=getFavorites(json.favorites);
|
|
|
- Object.assign(state, {routes:state.routes,asyncRoutes:data,styles:styles,blocks:blocks,...generData,isLogin:isLogin,userInfo:userInfo,hallServerUrl:hallServerUrl,favorites:favorites});
|
|
|
+ // let favorites=getFavorites(json.favorites);
|
|
|
+ Object.assign(state, {routes:state.routes,asyncRoutes:data,styles:styles,blocks:blocks,...generData,isLogin:isLogin,userInfo:userInfo,hallServerUrl:hallServerUrl});
|
|
|
}
|
|
|
}
|
|
|
const routesStatus=(state,status,arg)=>{
|
|
|
@@ -441,7 +441,7 @@ export const Main=createSlice({
|
|
|
state.favorites=favorites;
|
|
|
}
|
|
|
}
|
|
|
- localStorageSet(LOCAL_FAVO_IDS,JSON.stringify(favorites));
|
|
|
+ // localStorageSet(LOCAL_FAVO_IDS,JSON.stringify(favorites));
|
|
|
}
|
|
|
},
|
|
|
extraReducers: (builder) => {
|