2026-09-29 20:57:40 +08:00
|
|
|
const development = Boolean(import.meta.env?.DEV)
|
|
|
|
|
let selectedApiRoot = ''
|
|
|
|
|
// #ifndef H5
|
|
|
|
|
selectedApiRoot = import.meta.env?.VITE_API_BASE_URL || ''
|
|
|
|
|
// #endif
|
2026-09-29 17:56:05 +08:00
|
|
|
// #ifdef H5
|
2026-09-29 20:57:40 +08:00
|
|
|
selectedApiRoot = import.meta.env?.VITE_H5_API_BASE_URL || '/api'
|
2026-09-29 17:56:05 +08:00
|
|
|
// #endif
|
|
|
|
|
export const API_ROOT = String(selectedApiRoot).replace(/\/$/, '')
|
2026-08-25 19:56:47 +08:00
|
|
|
export const DEV_LOGIN = Object.freeze({
|
2026-09-29 20:57:40 +08:00
|
|
|
username: development ? String(import.meta.env?.VITE_PDA_DEV_USERNAME || '') : '',
|
|
|
|
|
password: development ? String(import.meta.env?.VITE_PDA_DEV_PASSWORD || '') : ''
|
2026-08-25 19:56:47 +08:00
|
|
|
})
|