fix(嵌入式): 嵌入式二级路径问题

This commit is contained in:
dataeaseShu 2024-03-15 18:05:37 +08:00
parent d9e31523ca
commit 5ebb5ee33b

View File

@ -37,7 +37,9 @@ const getPrefix = (): string => {
}
if (url.includes(suffix)) {
const { origin, pathname } = new URL(url)
prefix = `${origin}${pathname.slice(0, pathname.length - 1)}`
const splitArr = pathname.split('/')
splitArr.pop()
prefix = `${origin}${splitArr.join('/')}`
return true
}
}