token的获取方式改变

This commit is contained in:
ag 2024-12-27 09:41:41 +08:00
parent 6040224f29
commit fee4985d75

View File

@ -1,6 +1,6 @@
import { Query, QueryTask, QueryType } from './cellsysUtil.js'; import { Query, QueryTask, QueryType } from './cellsysUtil.js';
import './utils/paho-mqtt.js'; import './utils/paho-mqtt.js';
import { getToken } from '@/utils/auth'; import cellsysSystem from './cellsysSystem';
let clientManager = { let clientManager = {
//全局clinet管理 //全局clinet管理
@ -37,7 +37,7 @@ const TopicType = {
const createMqttClient = (cellsysPush, cellsysTopic) => { const createMqttClient = (cellsysPush, cellsysTopic) => {
// let clientId = 'cellsys' + (new Date().getTime()) + Math.floor(Math.random() * 100) // let clientId = 'cellsys' + (new Date().getTime()) + Math.floor(Math.random() * 100)
let clientId = getToken() + cellsysTopic.topicType + new Date().getTime(); let clientId = cellsysSystem.token + cellsysTopic.topicType + new Date().getTime();
let { ip, port, aliasPath, isSSL, username, password } = cellsysPush; let { ip, port, aliasPath, isSSL, username, password } = cellsysPush;
let client; let client;