Files
pda-overseas-uniapp/src/config/runtime.js
T

14 lines
533 B
JavaScript
Raw Normal View History

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-30 14:27:37 +08:00
selectedApiRoot = import.meta.env?.VITE_H5_API_BASE_URL || '/gateway-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({
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
})