forked from github/dataease
Merge pull request #8583 from dataease/pr@dev-v2_pathname
fix(嵌入式): 后端适配动态前缀路径
This commit is contained in:
commit
a63c4287b3
@ -54,7 +54,6 @@ const timeConfig = computed(() => {
|
||||
watch(
|
||||
() => timeConfig.value,
|
||||
() => {
|
||||
console.log(1)
|
||||
init()
|
||||
},
|
||||
{
|
||||
|
@ -36,10 +36,7 @@ const getPrefix = (): string => {
|
||||
url = ele.src
|
||||
}
|
||||
if (url.includes(suffix)) {
|
||||
const { origin, pathname } = new URL(url)
|
||||
const splitArr = pathname.split('/')
|
||||
splitArr.pop()
|
||||
prefix = `${origin}${splitArr.join('/')}`
|
||||
prefix = new URL(url).origin
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user