添加 退出用户 清理localStorage
This commit is contained in:
@@ -47,6 +47,46 @@ export const useAdminInfo = defineStore('adminInfo', {
|
||||
dataFill(state: AdminInfo) {
|
||||
this.$state = { ...this.$state, ...state }
|
||||
},
|
||||
reset() {
|
||||
this.$state = {
|
||||
access_token: '',
|
||||
token_type: '',
|
||||
refresh_token: '',
|
||||
expires_in: 0,
|
||||
scope: '',
|
||||
nickname: '',
|
||||
userType: 0,
|
||||
deptIndex: '',
|
||||
userIndex: '',
|
||||
client_id: '',
|
||||
headSculpture: '',
|
||||
jti: '',
|
||||
name: '',
|
||||
deptId: '',
|
||||
phone: '',
|
||||
email: '',
|
||||
limitIpStart: '',
|
||||
limitIpEnd: '',
|
||||
limitTime: '',
|
||||
casualUser: 0,
|
||||
type: 0,
|
||||
smsNotice: 0,
|
||||
emailNotice: 0,
|
||||
role: [],
|
||||
devCode: '',
|
||||
id: '',
|
||||
loginName: '',
|
||||
state: 0,
|
||||
registerTime: '',
|
||||
loginTime: '',
|
||||
deptName: '',
|
||||
areaId: '',
|
||||
areaName: '',
|
||||
deptLevel: 0,
|
||||
roleList: [],
|
||||
roleCode: []
|
||||
}
|
||||
},
|
||||
removeToken() {
|
||||
this.access_token = ''
|
||||
this.refresh_token = ''
|
||||
|
||||
Reference in New Issue
Block a user