feat: 优化

This commit is contained in:
2026-03-02 01:32:02 +08:00
parent ce3d529f80
commit 668515a451
4 changed files with 60 additions and 54 deletions

View File

@@ -19,7 +19,7 @@ function getBaseUrl() {
}
return ''
}
//
const BASE_URL = getBaseUrl()
/**
@@ -61,7 +61,7 @@ export const isDev = () => {
*/
export function getApiUrl(module, path) {
const base = API_BASE[module] || API_BASE.APP
return `${base}${path.startsWith('/') ? path : '/' + path}`
return `${base}${path.startsWith('/') ? '' : '/'}${path}`
}
export default API_BASE