引入mqtt
This commit is contained in:
@@ -1,25 +1,32 @@
|
||||
const debug = false // true 是连地服务端本地,false 是连接线上
|
||||
|
||||
const development = {
|
||||
domain: 'http://192.168.1.60:8094',
|
||||
STATIC: '',
|
||||
tenantId: 'rocanOA',
|
||||
|
||||
DOMAIN: 'http://192.168.1.60:8094',
|
||||
MQTT_OPTIONS: {
|
||||
clientId: '',
|
||||
connectTimeout: 15000,
|
||||
username: 'admin',
|
||||
password: 'admin',
|
||||
}
|
||||
}
|
||||
|
||||
const production = {
|
||||
domain: 'http://192.168.1.60:8094',
|
||||
STATIC: 'http://192.168.1.60:8094',
|
||||
tenantId: 'rocanOA',
|
||||
DOMAIN: 'http://192.168.1.60:8094',
|
||||
MQTT_OPTIONS: {
|
||||
clientId: '',
|
||||
connectTimeout: 15000,
|
||||
username: 'admin',
|
||||
password: 'admin',
|
||||
}
|
||||
}
|
||||
|
||||
const config = debug ? development : production
|
||||
|
||||
// #ifdef H5
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
config.domain = '/api'
|
||||
config.DOMAIN = '/api'
|
||||
} else {
|
||||
config.domain = window.location.origin
|
||||
config.DOMAIN = window.location.origin
|
||||
}
|
||||
// #endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user