Files
pda-overseas-uniapp/src/config/runtime.js
T
2026-09-30 14:27:37 +08:00

14 lines
533 B
JavaScript

const development = Boolean(import.meta.env?.DEV)
let selectedApiRoot = ''
// #ifndef H5
selectedApiRoot = import.meta.env?.VITE_API_BASE_URL || ''
// #endif
// #ifdef H5
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({
username: development ? String(import.meta.env?.VITE_PDA_DEV_USERNAME || '') : '',
password: development ? String(import.meta.env?.VITE_PDA_DEV_PASSWORD || '') : ''
})