| | |
| | | { name: "white", color: "#fff" }, |
| | | ]); |
| | | const links = ref([ |
| | | { text: "个人ä¸å¿", path: "/UserInfo", id: -1, icon: "el-icon-s-custom" }, |
| | | // { text: "个人ä¸å¿", path: "/UserInfo", id: -1, icon: "el-icon-s-custom" }, |
| | | { |
| | | text: "å®å
¨éåº", |
| | | path: "/login", |
| | |
| | | }); |
| | | }; |
| | | |
| | | const createSocket = (url) => { |
| | | // å建WebSocketè¿æ¥ |
| | | //"ws://127.0.0.1:9295/admin" |
| | | client = new WebSocket(url); |
| | | // const createSocket = (url) => { |
| | | // // å建WebSocketè¿æ¥ |
| | | // //"ws://127.0.0.1:9295/admin" |
| | | // client = new WebSocket(url); |
| | | |
| | | client.onopen = function () { |
| | | client.onmessage = handleMessage; |
| | | store.commit("setWebsocket", client); |
| | | console.log("WebSocket è¿æ¥æå"); |
| | | }; |
| | | // client.onopen = function () { |
| | | // client.onmessage = handleMessage; |
| | | // store.commit("setWebsocket", client); |
| | | // console.log("WebSocket è¿æ¥æå"); |
| | | // }; |
| | | |
| | | client.onclose = function () { |
| | | console.log("WebSocket è¿æ¥å
³é"); |
| | | setTimeout(createSocket, 10000); |
| | | }; |
| | | |
| | | client.onerror = function () {}; |
| | | }; |
| | | // client.onclose = function () { |
| | | // console.log("WebSocket è¿æ¥å
³é"); |
| | | // setTimeout(createSocket, 10000); |
| | | // }; |
| | | // //çå¬socketéè¯¯ä¿¡æ¯ |
| | | // client.onerror = function () {}; |
| | | // }; |
| | | |
| | | const changeTheme = (name) => { |
| | | if (theme.value != name) { |
| | |
| | | } |
| | | } |
| | | |
| | | createSocket("ws://127.0.0.1:9296/" + _userInfo.userName); |
| | | // createSocket("ws://127.0.0.1:9296/" + _userInfo.userName); |
| | | |
| | | Object.assign(_config.$tabs, { open: open, close: close }); |
| | | |