feat: 优化
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user