Commit a75e9efd authored by 崔佳豪's avatar 崔佳豪

fix: 退出client参数为token问题

parent 86184b18
Pipeline #48553 skipped with stages
...@@ -123,7 +123,7 @@ const appReducer = (state = initialState, action) => { ...@@ -123,7 +123,7 @@ const appReducer = (state = initialState, action) => {
} }
} }
window.globalConfig.home = home; window.globalConfig.home = home;
Cookies.set('city', Cookies.get('city') || window.globalConfig.client); Cookies.set('client', Cookies.get('client') || window.globalConfig.client);
window.globalConfig = config; window.globalConfig = config;
return state.merge({ return state.merge({
globalConfig: config, globalConfig: config,
......
...@@ -47,7 +47,7 @@ export const initGlobalConfig = () => { ...@@ -47,7 +47,7 @@ export const initGlobalConfig = () => {
// // eslint-disable-next-line react-hooks/rules-of-hooks // // eslint-disable-next-line react-hooks/rules-of-hooks
// } // }
let client = params.getParams('client') || Cookies.get('city'); let client = params.getParams('client') || Cookies.get('client');
client = client && client !== 'undefined' ? client : 'city'; client = client && client !== 'undefined' ? client : 'city';
const queryConfig = (gateWayConfig = {}) => { const queryConfig = (gateWayConfig = {}) => {
...@@ -62,7 +62,7 @@ export const initGlobalConfig = () => { ...@@ -62,7 +62,7 @@ export const initGlobalConfig = () => {
if (!data.client) { if (!data.client) {
data.client = client; data.client = client;
} }
// Cookies.set('city', data.client); // Cookies.set('client', data.client);
store.dispatch( store.dispatch(
actionCreators.getConfig( actionCreators.getConfig(
Object.assign( Object.assign(
...@@ -78,7 +78,7 @@ export const initGlobalConfig = () => { ...@@ -78,7 +78,7 @@ export const initGlobalConfig = () => {
), ),
); );
// Cookies.set('city', params.getParams('client')) // Cookies.set('client', params.getParams('client'))
if (data.loginTemplate === '新春 - 智联.html') { if (data.loginTemplate === '新春 - 智联.html') {
updateTheme('#ff9600'); updateTheme('#ff9600');
......
...@@ -920,13 +920,13 @@ class Login { ...@@ -920,13 +920,13 @@ class Login {
if(response.access_token!== "") { if(response.access_token!== "") {
self.globalConfig.access_token = response.access_token; self.globalConfig.access_token = response.access_token;
localStorage.setItem('access_token', response.access_token); localStorage.setItem('access_token', response.access_token);
Cookies.set('city', self.globalConfig.client, { Cookies.set('client', self.globalConfig.client, {
expires: exp / (24 * 60 * 60 * 1000), expires: exp / (24 * 60 * 60 * 1000),
path: '/', path: '/',
}) })
} }
if (isRememberPWD) { if (isRememberPWD) {
Cookies.set('city', self.globalConfig.client, { Cookies.set('client', self.globalConfig.client, {
expires: exp / (24 * 60 * 60 * 1000), expires: exp / (24 * 60 * 60 * 1000),
path: '/', path: '/',
}); });
......
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