Commit 40c8e8f2 by qlintonger xeno

Merge remote-tracking branch 'origin/master'

parents 8e72a7e7 cd1f4c91
...@@ -2,7 +2,7 @@ import { defineStore } from 'pinia' ...@@ -2,7 +2,7 @@ import { defineStore } from 'pinia'
import type { UserState, UserInfo } from './types' import type { UserState, UserInfo } from './types'
import useAppStore from '@/store/app/index' import useAppStore from '@/store/app/index'
import { activedTheme } from '../../../project.ui.config' import { activedTheme } from '../../../project.ui.config'
import {wsShouldOpen} from "AnyR/states/coreState.js" import { wsShouldOpen } from 'AnyR/states/coreState.js'
const useContactsStore = defineStore('user', { const useContactsStore = defineStore('user', {
state: (): UserState => { state: (): UserState => {
...@@ -28,13 +28,12 @@ const useContactsStore = defineStore('user', { ...@@ -28,13 +28,12 @@ const useContactsStore = defineStore('user', {
setUserInfo(res: UserInfo) { setUserInfo(res: UserInfo) {
this.token = res.token this.token = res.token
this.user_info = res this.user_info = res
this.router.push('/').then(function () {
wsShouldOpen.value = true
})
//初始化主题色 //初始化主题色
const { changeTheme } = useAppStore() const { changeTheme } = useAppStore()
changeTheme(activedTheme.value) changeTheme(activedTheme.value)
this.router.push('/')
.then(function () {
wsShouldOpen.value = true;
})
}, },
//退出登录 //退出登录
handleLogOut() { handleLogOut() {
...@@ -49,6 +48,7 @@ const useContactsStore = defineStore('user', { ...@@ -49,6 +48,7 @@ const useContactsStore = defineStore('user', {
videoGroup: 0, videoGroup: 0,
autoRecord: false autoRecord: false
} }
wsShouldOpen.value = false
const { changeTheme } = useAppStore() const { changeTheme } = useAppStore()
changeTheme('light') changeTheme('light')
this.router.replace('/login') this.router.replace('/login')
......
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