Commit 5144118f authored by 徐乐's avatar 徐乐

feat: 修改集成子站切换功能加载问题

parent 1fd2fcb0
Pipeline #79583 passed with stages
...@@ -530,7 +530,7 @@ const Layout = props => { ...@@ -530,7 +530,7 @@ const Layout = props => {
appService.getTicketByToken({ token: window.globalConfig?.token }).then(res => { appService.getTicketByToken({ token: window.globalConfig?.token }).then(res => {
if (res.code === 0) { if (res.code === 0) {
setVisible(false); setVisible(false);
const url = `${val.url + (val.url.indexOf('?') > 0 ? '&' : '?') + val.paramName }=${ res.data}`; const url = `${val.url + (val.url.indexOf('?') > 0 ? '&' : '?') + val.paramName}=${res.data}`;
window.open(url, "_blank"); window.open(url, "_blank");
} else { } else {
setVisible(false); setVisible(false);
...@@ -543,10 +543,14 @@ const Layout = props => { ...@@ -543,10 +543,14 @@ const Layout = props => {
}); });
} else { } else {
setVisible(false); setVisible(false);
const url = `${val.url + (val.url.indexOf('?') > 0 ? '&' : '?') + val.paramName }=${ window.globalConfig?.token}`; const url = `${val.url + (val.url.indexOf('?') > 0 ? '&' : '?') + val.paramName}=${window.globalConfig?.token}`;
window.open(url, "_blank"); window.open(url, "_blank");
} }
} else { } else {
store.set('event:refreshCurrentMenu', {
dropCache: true,
action: 'closeAllTabs'
})
const cli = val.url?.indexOf('client=') >= 0 ? val.url.split('client=')[1] : ''; const cli = val.url?.indexOf('client=') >= 0 ? val.url.split('client=')[1] : '';
Cookies.set('client', cli, { Cookies.set('client', cli, {
expires: 86400000 / (24 * 60 * 60 * 1000), expires: 86400000 / (24 * 60 * 60 * 1000),
......
...@@ -7,6 +7,7 @@ import { connect } from 'react-redux'; ...@@ -7,6 +7,7 @@ import { connect } from 'react-redux';
import { useDocumentTitle } from '@ant-design/pro-utils'; import { useDocumentTitle } from '@ant-design/pro-utils';
import defaultSetting from '@wisdom-utils/components/lib/AppLayout/layouts/defaultSettings'; import defaultSetting from '@wisdom-utils/components/lib/AppLayout/layouts/defaultSettings';
import { actionCreators } from '@/containers/App/store'; import { actionCreators } from '@/containers/App/store';
import { store } from '@wisdom-utils/utils';
import LoginAction from '@/pages/user/login/login'; import LoginAction from '@/pages/user/login/login';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import { defaultApp } from '@/micro'; import { defaultApp } from '@/micro';
...@@ -62,6 +63,7 @@ const Integration = props => { ...@@ -62,6 +63,7 @@ const Integration = props => {
window.open(url, "_blank"); window.open(url, "_blank");
} }
} else { } else {
store.set('event:dropCache');
let cli = item.url?.indexOf('client=') >= 0 ? item.url.split('client=')[1] : ''; let cli = item.url?.indexOf('client=') >= 0 ? item.url.split('client=')[1] : '';
Cookies.set('client', cli, { Cookies.set('client', cli, {
......
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