获取token修改
This commit is contained in:
@@ -32,7 +32,15 @@ export const useAdminInfo = defineStore('adminInfo', {
|
||||
this[field] = token
|
||||
},
|
||||
getToken(type: 'auth' | 'refresh' = 'auth') {
|
||||
return type === 'auth' ? this.token_type + ' ' + this.access_token : this.refresh_token
|
||||
if (type === 'auth') {
|
||||
if (this.token_type && this.access_token) {
|
||||
return this.token_type + ' ' + this.access_token
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
} else {
|
||||
return this.refresh_token
|
||||
}
|
||||
}
|
||||
},
|
||||
persist: {
|
||||
|
||||
Reference in New Issue
Block a user