Merge pull request #8583 from dataease/pr@dev-v2_pathname

fix(嵌入式): 后端适配动态前缀路径
This commit is contained in:
dataeaseShu 2024-03-19 15:56:43 +08:00 committed by GitHub
commit a63c4287b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 5 deletions

View File

@ -54,7 +54,6 @@ const timeConfig = computed(() => {
watch(
() => timeConfig.value,
() => {
console.log(1)
init()
},
{

View File

@ -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
}
}