xieb
2023-09-13 3667807a7b7418efc090ee3fa6a6b734bc3080bf
src/mqtt/index.ts
@@ -34,10 +34,13 @@
      ...OPTIONS,
      ...this._options,
    })
    console.log(this._client, 'client')
    this._hasInit = true
    if (this._client) {
      this._client.on('reconnect', this._onReconnect)
      this._client.on('connect', () => {
        console.log('connect')
      })
      // 消息监听
      this._client.on('message', this._onMessage)