fix:修复前台iframe菜单无法打开的问题 close #I6I00K

This commit is contained in:
妙码生花 2023-02-28 06:46:08 +08:00
parent 3da9e62f68
commit 5b96bc062a

View File

@ -7,6 +7,7 @@ import { useMemberCenter } from '/@/stores/memberCenter'
import { closeShade } from '/@/utils/pageShade'
import { adminBaseRoute, memberCenterBaseRoute } from '/@/router/static'
import { i18n } from '/@/lang/index'
import { isAdminApp } from '/@/utils/common'
/**
* push
@ -204,7 +205,7 @@ export const addRouteItem = (viewsComponent: Record<string, any>, route: any, pa
let path = '',
component
if (route.menu_type == 'iframe') {
path = '/admin/iframe/' + encodeURIComponent(route.url)
path = (isAdminApp() ? '/admin' : '/user') + '/iframe/' + encodeURIComponent(route.url)
component = () => import('/@/layouts/common/router-view/iframe.vue')
} else {
path = parentName ? route.path : '/' + route.path