生产配置修改
parent
63d0355c27
commit
0a2bf1ff9a
|
|
@ -1,6 +1,7 @@
|
|||
// 应用全局配置
|
||||
module.exports = {
|
||||
baseUrl: process.env.UNI_PLATFORM === 'mp-weixin'?"http://122.51.109.52:8088":(process.env.NODE_ENV === "production" ? "/api" : "http://localhost:8088"),
|
||||
// baseUrl: process.env.UNI_PLATFORM === 'mp-weixin'?"http://122.51.109.52:8088":(process.env.NODE_ENV === "production" ? "/api" : "http://localhost:8088"),
|
||||
baseUrl: process.env.NODE_ENV === "production"?"https://api.xiaoces.com/api":"http://localhost:8088",
|
||||
// 应用信息
|
||||
appInfo: {
|
||||
// 应用名称
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@ import mqtt from 'mqtt/dist/mqtt'
|
|||
|
||||
// ===================== MQTT配置(暂时写死,TODO:后续从数据字典获取)=====================
|
||||
const MQTT_CONFIG = {
|
||||
server: 'wxs://mq.mj142.cn:443/mqtt', // 替换为你的MQTT服务器地址
|
||||
server: 'wxs://mq.xiaoces.com:443/mqtt', // 替换为你的MQTT服务器地址
|
||||
username: 'admin', // 替换为通用账号
|
||||
password: 'Admin#12345678', // 替换为通用密码
|
||||
clean: true,
|
||||
host: 'mq.mj142.cn',
|
||||
host: 'mq.xiaoces.com',
|
||||
port: 443,
|
||||
reconnectPeriod: 5000, // 重连间隔
|
||||
connectTimeout: 10000, // 连接超时
|
||||
|
|
@ -86,7 +86,7 @@ export function connectMqtt() {
|
|||
try {
|
||||
// 创建客户端实例(同步操作)
|
||||
// #ifndef MP-WEIXIN
|
||||
MQTT_CONFIG.server = 'wss://mq.mj142.cn:443/mqtt'
|
||||
MQTT_CONFIG.server = 'wss://mq.xiaoces.com:443/mqtt'
|
||||
// #endif
|
||||
console.info("mqttState.connect",mqttState)
|
||||
mqttState.client = mqtt.connect(MQTT_CONFIG.server, mqttState.options)
|
||||
|
|
|
|||
Loading…
Reference in New Issue