fix(嵌入式): 后端适配动态前缀路径

This commit is contained in:
dataeaseShu 2024-03-19 15:55:23 +08:00
parent 478892f762
commit 6da6f589ec
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
}
}