|
|
@ -9,7 +9,7 @@ import ParentView from '@/components/ParentView/index.vue'; |
|
|
import InnerLink from '@/layout/components/InnerLink/index.vue'; |
|
|
import InnerLink from '@/layout/components/InnerLink/index.vue'; |
|
|
import { ref, computed } from 'vue'; |
|
|
import { ref, computed } from 'vue'; |
|
|
import { createCustomNameComponent } from '@/utils/createCustomNameComponent'; |
|
|
import { createCustomNameComponent } from '@/utils/createCustomNameComponent'; |
|
|
import { isHttp } from '@/utils/validate'; |
|
|
import { isHttp, resolveSameOriginUrl } from '@/utils/validate'; |
|
|
import { useUserStore } from '@/store/modules/user'; |
|
|
import { useUserStore } from '@/store/modules/user'; |
|
|
|
|
|
|
|
|
// 匹配views里面所有的.vue文件
|
|
|
// 匹配views里面所有的.vue文件
|
|
|
@ -41,11 +41,8 @@ export const usePermissionStore = defineStore('permission', () => { |
|
|
*/ |
|
|
*/ |
|
|
const buildIframeUrl = (baseUrl: string): string => { |
|
|
const buildIframeUrl = (baseUrl: string): string => { |
|
|
if (!baseUrl) return ''; |
|
|
if (!baseUrl) return ''; |
|
|
// 当配置了 Same-origin 占位符时,替换为浏览器当前的 origin(协议+主机+端口)
|
|
|
// 同主机绝对地址 / Same-origin 占位符统一跟当前访问端口走
|
|
|
let resolvedUrl = baseUrl; |
|
|
const resolvedUrl = resolveSameOriginUrl(baseUrl); |
|
|
if (baseUrl.includes('Same-origin')) { |
|
|
|
|
|
resolvedUrl = baseUrl.replace('Same-origin', window.location.origin); |
|
|
|
|
|
} |
|
|
|
|
|
const userStore = useUserStore(); |
|
|
const userStore = useUserStore(); |
|
|
const params = new URLSearchParams(); |
|
|
const params = new URLSearchParams(); |
|
|
if (userStore.v1SystemCredential) { |
|
|
if (userStore.v1SystemCredential) { |
|
|
|