This commit is contained in:
2026-09-30 14:27:37 +08:00
parent 8398d5ead9
commit 244208c690
12 changed files with 62 additions and 33 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ function overseasUrl(path) {
throw error
}
const value = `/${String(path || '').replace(/^\/+/, '')}`
const normalized = /\/api$/.test(base)
const normalized = /\/(?:api|gateway-api)$/.test(base)
? value.replace(/^\/api(?=\/)/, '')
: value
return `${base}${normalized}`
+1 -1
View File
@@ -4,7 +4,7 @@ let selectedApiRoot = ''
selectedApiRoot = import.meta.env?.VITE_API_BASE_URL || ''
// #endif
// #ifdef H5
selectedApiRoot = import.meta.env?.VITE_H5_API_BASE_URL || '/api'
selectedApiRoot = import.meta.env?.VITE_H5_API_BASE_URL || '/gateway-api'
// #endif
export const API_ROOT = String(selectedApiRoot).replace(/\/$/, '')
export const DEV_LOGIN = Object.freeze({