build: make h5 api url environment driven

This commit is contained in:
hajimi
2026-08-02 11:18:55 +08:00
parent 11b08def88
commit 96352e92bc
+4 -2
View File
@@ -1,4 +1,6 @@
const envBaseUrl = 'https://test-server.sbnews.net/' const configuredBaseUrl =
import.meta.env.VITE_APP_BASE_URL || 'https://test-server.sbnews.net'
const envBaseUrl = configuredBaseUrl.replace(/\/+$/, '')
let baseUrl = `${envBaseUrl}/` let baseUrl = `${envBaseUrl}/`
@@ -9,7 +11,7 @@ let baseUrl = `${envBaseUrl}/`
*/ */
//#ifdef MP-WEIXIN //#ifdef MP-WEIXIN
baseUrl = envBaseUrl baseUrl = `${envBaseUrl}/`
//#endif //#endif
const config = { const config = {