This commit is contained in:
bb_pan 2025-09-28 22:13:51 +08:00
parent 447382eefe
commit 9e09a4ba84
1 changed files with 3 additions and 1 deletions

View File

@ -78,7 +78,7 @@ export default {
] ]
}, },
socket: null, socket: null,
wsUrl: JSON.parse(localStorage.getItem('systemConfig')).webSocketurl,//'ws://localhost:18082/ws', // WebSocket wsUrl: '',//'ws://localhost:18082/ws', // WebSocket
isConnected: false, // isConnected: false, //
reconnectInterval: 5000 // reconnectInterval: 5000 //
@ -117,6 +117,8 @@ export default {
}, },
created() { created() {
// this.checkPasswordStatus() // this.checkPasswordStatus()
const systemConfig = localStorage.getItem('systemConfig')
this.wsUrl = systemConfig ? JSON.parse(systemConfig).webSocketurl : ''
if (this.roles.includes("audit") || this.roles.includes("systemAdmin")) { if (this.roles.includes("audit") || this.roles.includes("systemAdmin")) {
this.connectWebSocket(); this.connectWebSocket();
} }