feat: websocket优化

This commit is contained in:
李强
2023-11-23 18:55:25 +08:00
parent 6172dea399
commit 42e6c7b600
9 changed files with 100 additions and 18 deletions

View File

@@ -26,6 +26,7 @@ export const useUserInfo = defineStore('userInfo', {
},
],
},
isSocketOpen: false
}),
actions: {
async updateUserInfos() {
@@ -57,6 +58,9 @@ export const useUserInfo = defineStore('userInfo', {
Session.set('userInfo', this.userInfos);
}
},
async setWebSocketState(socketState: boolean) {
this.isSocketOpen = socketState;
},
async getApiUserInfo() {
return request({
url: '/api/system/user/user_info/',