This commit is contained in:
van
2026-03-23 23:56:45 +08:00
parent e63ab42c41
commit 1b41508013
3 changed files with 32 additions and 5 deletions

View File

@@ -174,7 +174,8 @@ export default {
try {
const response = await getKdocsTokenStatus(this.userId)
if (response.code === 200) {
this.isAuthorized = response.data.hasToken && response.data.isValid
// 有 token 即视为已授权isValid 单独展示(避免 expires_in 缺失时误判未保存)
this.isAuthorized = !!response.data.hasToken
this.tokenInfo = response.data
if (response.data.userId) {
this.userId = response.data.userId

View File

@@ -132,7 +132,7 @@ export default {
try {
const response = await getKdocsTokenStatus(this.userId)
if (response.code === 200) {
this.isAuthorized = response.data.hasToken && response.data.isValid
this.isAuthorized = !!response.data.hasToken
if (this.isAuthorized) {
this.loadUserInfo()
}