Files
APP/config/index.js
2025-07-16 10:23:06 +08:00

33 lines
740 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 全局配置文件
const config = {
// 开发环境
development: {
BASE_URL: 'http://192.168.2.34:8000',
API_PREFIX: '',
// MQTT 配置
MQTT_HOST: '47.120.79.150',
MQTT_PORT: 8083,
MQTT_USERNAME: 'admin',
MQTT_PASSWORD: '#YtvpSfCNG'
},
// 生产环境
production: {
BASE_URL: 'https://fuyuanshen.com/backend',
API_PREFIX: '',
// MQTT 配置
MQTT_HOST: '47.120.79.150',
MQTT_PORT: 8083,
MQTT_USERNAME: 'admin',
MQTT_PASSWORD: '#YtvpSfCNG'
}
}
// 根据环境获取配置
function getConfig() {
// 这里可以根据实际情况判断环境
// 开发阶段使用development上线后改为production
const env = 'development' // 或者 'production'
return config[env]
}
export default getConfig()