Browse Source

fix: 登录逻辑重构1

master
guoapeng 3 months ago
parent
commit
3d30cf2b5b
  1. 9
      src/pages/Login/index.vue

9
src/pages/Login/index.vue

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { ref, onMounted, onUnmounted } from 'vue'
import { getUserList } from '@/services/Index/user-manage'
import type { User } from '@/types/Index'
import { createWebSocket, DeviceContextStateMessage } from '@/websocket/socket.ts'
@ -35,6 +35,13 @@ onMounted(() => {
getUserListData()
})
onUnmounted(() => {
wsState.unsubscribe<DeviceContextStateMessage>(
'DeviceContext',
handleDeviceContextState,
)
})
const activeUser = ref<User>()
const password = ref('')

Loading…
Cancel
Save