Commit 62dce9af authored by 杨思琦's avatar 杨思琦

fix: client调整

parent f646be85
Pipeline #66564 passed with stages
import { fromJS } from 'immutable'; import { fromJS } from 'immutable';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { AppConfig, store, event, Storage, helpers } from '@wisdom-utils/utils'; import { AppConfig, store, event, Storage, helpers } from '@wisdom-utils/utils';
import { Storeage as Store } from '@wisdom-utils/utils/lib/helpers'; import { params, Storeage as Store } from '@wisdom-utils/utils/lib/helpers';
import defaultSetting from '@wisdom-utils/components/lib/AppLayout/layouts/defaultSettings'; import defaultSetting from '@wisdom-utils/components/lib/AppLayout/layouts/defaultSettings';
import _ from 'lodash'; import _ from 'lodash';
import memoized from 'nano-memoize'; import memoized from 'nano-memoize';
...@@ -43,7 +43,9 @@ const keywordStorage = new Storage(`__global_search_keywords__micro_${window.loc ...@@ -43,7 +43,9 @@ const keywordStorage = new Storage(`__global_search_keywords__micro_${window.loc
const recentVisitedStorage = new Storage(`__global_recent_visited__micro_${window.location.hostname}`); const recentVisitedStorage = new Storage(`__global_recent_visited__micro_${window.location.hostname}`);
const recentProductStorage = new Storage(`__global__recent_product__micro_${window.location.hostname}`); const recentProductStorage = new Storage(`__global__recent_product__micro_${window.location.hostname}`);
const currentProduct = new Store( const currentProduct = new Store(
`__global__recent_productIndex__micro_${window.location.hostname}_${sessionStorage.getItem('client') || 'city'}`, `__global__recent_productIndex__micro_${window.location.hostname}_${params.getParams('client') ||
sessionStorage.getItem('client') ||
'city'}`,
); );
Cookies.set('loginMode', Cookies.get('loginMode') || 'pdw'); Cookies.set('loginMode', Cookies.get('loginMode') || 'pdw');
export const initialState = fromJS({ export const initialState = fromJS({
......
...@@ -246,7 +246,9 @@ const transformFloatMenu = (routes, homepage) => { ...@@ -246,7 +246,9 @@ const transformFloatMenu = (routes, homepage) => {
const Layout = props => { const Layout = props => {
const currentProduct = new Store( const currentProduct = new Store(
`__global__recent_productIndex__micro_${window.location.hostname}_${sessionStorage.getItem('client') || 'city'}`, `__global__recent_productIndex__micro_${window.location.hostname}_${params.getParams('client') ||
sessionStorage.getItem('client') ||
'city'}`,
); );
const menuState = sessionStorage.getItem('menuState') || 'open'; const menuState = sessionStorage.getItem('menuState') || 'open';
const [cityData, setCityData] = useState({}); const [cityData, setCityData] = useState({});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment