优化mqtt协议代码

This commit is contained in:
fengerli
2025-08-16 13:59:17 +08:00
parent 8e1a37dbea
commit fe5545b642
7 changed files with 1443 additions and 1448 deletions

View File

@ -1,5 +1,5 @@
import config from '../config/index.js';
const env = 'development'; //production development //开发of线上 改这里就行
const env = 'production'; //production development //开发of线上 改这里就行
const BASE = config[env];
const request = (options) => {
console.log("options"+JSON.stringify(options),BASE.BASE_URL)
@ -20,7 +20,7 @@ const request = (options) => {
method: options.method || 'GET',
data: options.method !== 'GET' ? options.data : {},
header: options.header || {},
timeout: 10000,
timeout: 30000,
success: (res) => {
resolve(res.data);
},