Commit da1c28c4 by 赖慧粮

auto deploy

parent 7018c0da
...@@ -112,14 +112,18 @@ export default { ...@@ -112,14 +112,18 @@ export default {
methods: { methods: {
connectionInit() { connectionInit() {
if (process.client) { if (process.client) {
// const { ClientConnection } = await import('@easy-messenger/client-connection') window.onload = () => {
// console.log(ClientConnection) // const { ClientConnection } = await import('@easy-messenger/client-connection')
const { ClientConnection } = require('@easy-messenger/client-connection/dist/clientConnection.cjs.js') // console.log(ClientConnection)
this.connection = new ClientConnection({ debug: true }) const { ClientConnection } = require('@easy-messenger/client-connection/dist/clientConnection.cjs.js')
setInterval(() => { this.connection = new ClientConnection({ debug: true })
this.connection.init() // setInterval(() => {
}, 1000) // }, 1000)
this.connectionListener() setTimeout(() => {
this.connection.init()
}, 2000)
this.connectionListener()
}
} }
}, },
connectionListener() { connectionListener() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment