Commit 4912b961 authored by 张海景's avatar 张海景

update:修改打印机连接加上关闭的方法

parent 27874b8e
...@@ -33,6 +33,9 @@ module.exports = { ...@@ -33,6 +33,9 @@ module.exports = {
}, },
methods: { methods: {
createSocket() { createSocket() {
if (Object.keys(getApp().globalData.printSocket).length > 0) {
getApp().globalData.printSocket.close && getApp().globalData.printSocket.close()
}
this.$u.vuex('vuex_printConnect', false) this.$u.vuex('vuex_printConnect', false)
let socket = io(this.vuex_printerInfo.hostUrl, { let socket = io(this.vuex_printerInfo.hostUrl, {
transports: ['websocket'], transports: ['websocket'],
......
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 to comment