Showing
1 changed file
with
1 additions
and
1 deletions
| ... | ... | @@ -120,7 +120,7 @@ export class VAxios { |
| 120 | 120 | if (userStore && userStore.jwtToken) { |
| 121 | 121 | try { |
| 122 | 122 | const res = jwt_decode(userStore.jwtToken) as JwtModel; |
| 123 | - const currentTime = new Date().getTime() / 1000; | |
| 123 | + const currentTime = (new Date().getTime() + (config.timeout || 0)) / 1000; | |
| 124 | 124 | if (currentTime >= res.exp && this.isNeedTokenURL(config.url)) { |
| 125 | 125 | await this.refreshTokenBeforeReq(userStore.doRefresh); |
| 126 | 126 | } | ... | ... |