37 lines
953 B
JavaScript
37 lines
953 B
JavaScript
// H5端开发和生产环境协议
|
||
let protocalDev = "wss://";
|
||
let protocalProd = "wss://";
|
||
|
||
// 条件编译,微信端和移动端使用wxs协议
|
||
// #ifdef MP-WEIXIN || APP-PLUS
|
||
protocalDev = 'wxs://';
|
||
protocalProd = 'wxs://';
|
||
// #endif
|
||
|
||
// 腾讯地图key
|
||
let qqmapKey = '4PDBZ-4KQKU-AX6VO-GU7NB-INDZJ-YBFXC';
|
||
|
||
// 心知天气key
|
||
let xinzhiKey = 'SBh45_yy21FU5ErV_';
|
||
|
||
const CONFIG = {
|
||
// 开发环境配置
|
||
development: {
|
||
officialWebUrl: 'https://www.xcwl-aiot.cn/',
|
||
baseUrl: 'https://www.xcwl-aiot.cn/prod-api/',
|
||
mqttServer: protocalDev + 'www.xcwl-aiot.cn/mqtt',
|
||
decoderUrl: 'https://www.xcwl-aiot.cn/',
|
||
qqmapKey,
|
||
xinzhiKey,
|
||
},
|
||
// 生产环境配置
|
||
production: {
|
||
officialWebUrl: 'https://www.xcwl-aiot.cn/',
|
||
baseUrl: 'https://www.xcwl-aiot.cn/prod-api/',
|
||
mqttServer: protocalDev + 'www.xcwl-aiot.cn/mqtt',
|
||
decoderUrl: 'https://www.xcwl-aiot.cn/',
|
||
qqmapKey,
|
||
xinzhiKey,
|
||
}
|
||
}
|
||
export default CONFIG[process.env.NODE_ENV]; |