refs #5554 refactor: sustiuido window.localStorage por this
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
61f99744c9
commit
ddd23a9842
|
@ -36,8 +36,8 @@ export class Layout extends Component {
|
|||
this.$http.get('AccessTokenConfigs').then(json => {
|
||||
const firtsResult = json.data[0];
|
||||
if (!firtsResult) return;
|
||||
window.localStorage.renewPeriod = firtsResult.renewPeriod;
|
||||
window.localStorage.renewInterval = firtsResult.renewInterval;
|
||||
this.renewPeriod = firtsResult.renewPeriod;
|
||||
this.renewInterval = firtsResult.renewInterval;
|
||||
|
||||
const intervalMilliseconds = firtsResult.renewInterval * 1000;
|
||||
this.inservalId = setInterval(this.checkTokenValidity.bind(this), intervalMilliseconds);
|
||||
|
@ -49,7 +49,7 @@ export class Layout extends Component {
|
|||
const differenceMilliseconds = now - new Date(this.vnToken.created);
|
||||
const differenceSeconds = Math.floor(differenceMilliseconds / 1000);
|
||||
|
||||
if (differenceSeconds > window.localStorage.renewPeriod) {
|
||||
if (differenceSeconds > this.renewPeriod) {
|
||||
this.$http.post('VnUsers/renewToken')
|
||||
.then(json => {
|
||||
if (json.data.token) {
|
||||
|
|
Loading…
Reference in New Issue