Commit 204c5515 authored by 尚顺利's avatar 尚顺利
parents 8cafa855 fb5a4a41
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -112,7 +112,7 @@
"immutable": "^4.0.0-rc.12",
"js-base64": "^3.5.2",
"js-cookie": "^2.2.1",
"kit_global_config": "^1.0.29",
"kit_global_config": "^1.0.30",
"kit_logger": "^1.0.2",
"kit_utils": "^1.3.11",
"lodash": "4.17.11",
......
......@@ -45,6 +45,7 @@ import {
isString,
} from './utils/utils';
import './utils/event';
import Cookies from 'js-cookie';
const isHttps = document.location.protocol === 'https:';
const { pwa } = defaultSettings;
// eslint-disable-next-line no-restricted-globals
......@@ -128,9 +129,8 @@ const initGlobalConfig = () => {
});
// eslint-disable-next-line react-hooks/rules-of-hooks
appService
.queryConfig({ client: params.getParams('client') || 'city' })
.queryConfig({ client: params.getParams('client') || Cookies.get('city') || 'city' })
.then(res => {
debugger;
if (res) {
const data = res;
if (!data.client) {
......
......@@ -105,6 +105,7 @@ const appReducer = (state = initialState, action) => {
}
// eslint-disable-next-line no-case-declarations
const flatMenu = generFlatRoutes(generMenu || []);
Cookies.set('city', Cookies.get('city') || window.globalConfig.client);
return state.merge({
globalConfig: config,
menu: generMenu,
......
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