Commit d1adfddb authored by 周宏民's avatar 周宏民

fix: 修改跳转报错

parent b02f3882
Pipeline #93687 passed with stages
...@@ -144,7 +144,7 @@ const IntegratedSwitch = props => { ...@@ -144,7 +144,7 @@ const IntegratedSwitch = props => {
const cli = item.client; const cli = item.client;
if (item.client === props.global.client) { if (item.client === props.global.client) {
if (item.url) { if (item.url) {
goToPath(clientInfo.current?.url); goToPath(item.url);
return; return;
} }
} }
......
...@@ -116,6 +116,7 @@ export const getImageUrl = path => { ...@@ -116,6 +116,7 @@ export const getImageUrl = path => {
*/ */
export const goToPath = (path, data, widgetId, mode) => { export const goToPath = (path, data, widgetId, mode) => {
const routes = window.globalConfig?.allWidgets || []; const routes = window.globalConfig?.allWidgets || [];
if (!path || !routes.length) return;
let info = null; let info = null;
const target = path.substr(0, 1) === '/' ? path.slice(1) : path; const target = path.substr(0, 1) === '/' ? path.slice(1) : path;
function urlSearch(arr) { function urlSearch(arr) {
......
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