This commit is contained in:
quantulr
2023-12-11 15:25:14 +08:00
parent 62b38cbefb
commit 14c8ee028a
7 changed files with 405 additions and 371 deletions

9
src/utils/uri.js Normal file
View File

@ -0,0 +1,9 @@
export const resolveStaticUrl = (url) => {
const fileIndex = url.indexOf('/file')
if (fileIndex > 0) {
return `${import.meta.env.VITE_APP_BASE_API}/${url.substring(fileIndex)}`
} else {
return `${import.meta.env.VITE_APP_BASE_API}/file${url}`
}
}