Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
jijin
/
dance-pc
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
d9f45fde
authored
2025-05-29 17:29:20 +0800
by
zhangmeng
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
登录提示
1 parent
d91a4dd4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
7 deletions
src/store/modules/user.js
src/store/modules/user.js
View file @
d9f45fd
...
...
@@ -7,13 +7,14 @@ import aes from '@/utils/aes'
import
{
loginDance
}
from
'@/apiPc/login.js'
import
{
getRemindCount
}
from
'@/api/system/user'
import
{
ElMessageBox
}
from
'element-plus'
import
*
as
match
from
'@/apiPc/match'
const
useUserStore
=
defineStore
(
'user'
,
{
state
:
()
=>
({
token
:
getToken
(),
user
:
null
,
user
:
null
,
// uType 1个人账号,2团体账号,3游客登录
group
:
{},
name
:
''
,
nickName
:
''
,
...
...
@@ -30,10 +31,10 @@ const useUserStore = defineStore(
isExam
:
'1'
,
// 是否为考点,0:是;1:否,
genFlag
:
''
,
// 是否是自动的协会
badge
:
{},
reLogin
:
{
show
:
false
,
query
:
{}},
reLogin
:
{
show
:
false
,
query
:
{}},
visitor
:
false
,
language
:
0
,
activeName
:
"5"
activeName
:
'5'
}),
actions
:
{
// 登录
...
...
@@ -106,12 +107,34 @@ const useUserStore = defineStore(
this
.
perId
=
aes
.
encrypt
(
personInfo
.
perId
)
this
.
personInfo
=
personInfo
}
if
(
this
.
user
&&
this
.
user
.
utype
==
1
)
{
this
.
getCheckWDSF
()
}
resolve
(
res
.
data
)
}).
catch
(
error
=>
{
reject
(
error
)
})
})
},
getCheckWDSF
()
{
match
.
preCheckForPerson
({
type
:
'1'
}).
then
(
res
=>
{
if
(
res
.
data
==
0
)
{
const
language
=
localStorage
.
getItem
(
'language'
)
ElMessageBox
.
confirm
(
language
==
0
?
'您绑定的WDSF会员号已过期,请先到WDSF官网激活您的会员号。'
:
'Your bound WDSF Number has expired. Please activate your WDSF Number on the WDSF official website first.'
,
language
==
0
?
'提示'
:
'Tips'
,
{
type
:
'warning'
,
confirmButtonText
:
language
==
0
?
'确定'
:
'OK'
,
cancelButtonText
:
language
==
0
?
'取消'
:
'Cancel'
}
)
}
})
},
// 退出系统
logOut
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -148,9 +171,9 @@ const useUserStore = defineStore(
},
setReLogin
(
query
)
{
console
.
log
(
query
)
this
.
reLogin
=
{
show
:
true
,
query
:
query
}
this
.
reLogin
=
{
show
:
true
,
query
:
query
}
setTimeout
(()
=>
{
this
.
reLogin
=
{
show
:
false
,
query
:
query
}
this
.
reLogin
=
{
show
:
false
,
query
:
query
}
},
1000
)
},
checkAndLogin
()
{
...
...
@@ -165,8 +188,8 @@ const useUserStore = defineStore(
return
true
}
},
updataActiveName
(
v
){
this
.
activeName
=
v
updataActiveName
(
v
)
{
this
.
activeName
=
v
}
}
})
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment