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

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

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