Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
standalone-anyremote
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qlintonger xeno
standalone-anyremote
Commits
cd1f4c91
Commit
cd1f4c91
authored
Apr 29, 2024
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 开启ws
parent
0d6d1a6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/store/user/index.ts
+5
-5
No files found.
src/store/user/index.ts
View file @
cd1f4c91
...
...
@@ -2,7 +2,7 @@ import { defineStore } from 'pinia'
import
type
{
UserState
,
UserInfo
}
from
'./types'
import
useAppStore
from
'@/store/app/index'
import
{
activedTheme
}
from
'../../../project.ui.config'
import
{
wsShouldOpen
}
from
"AnyR/states/coreState.js"
import
{
wsShouldOpen
}
from
'AnyR/states/coreState.js'
const
useContactsStore
=
defineStore
(
'user'
,
{
state
:
():
UserState
=>
{
...
...
@@ -28,13 +28,12 @@ const useContactsStore = defineStore('user', {
setUserInfo
(
res
:
UserInfo
)
{
this
.
token
=
res
.
token
this
.
user_info
=
res
this
.
router
.
push
(
'/'
).
then
(
function
()
{
wsShouldOpen
.
value
=
true
})
//初始化主题色
const
{
changeTheme
}
=
useAppStore
()
changeTheme
(
activedTheme
.
value
)
this
.
router
.
push
(
'/'
)
.
then
(
function
()
{
wsShouldOpen
.
value
=
true
;
})
},
//退出登录
handleLogOut
()
{
...
...
@@ -49,6 +48,7 @@ const useContactsStore = defineStore('user', {
videoGroup
:
0
,
autoRecord
:
false
}
wsShouldOpen
.
value
=
false
const
{
changeTheme
}
=
useAppStore
()
changeTheme
(
'light'
)
this
.
router
.
replace
(
'/login'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment