cloud-web-corejs 1.0.54-dev.198 → 1.0.54-dev.199
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -454,14 +454,12 @@ export default {
|
|
454
454
|
},
|
455
455
|
initQR() {
|
456
456
|
this.clearQrLoginTimer();
|
457
|
-
this.
|
458
|
-
this.qrExpired = false;
|
457
|
+
this.qrExpired = true;
|
459
458
|
let option = {width: 300, height: 300};
|
460
459
|
this.qrContent = this.guid();
|
461
460
|
this.createQR(this.qrContent, option).then(url => {
|
462
461
|
this.qrExpired = false;
|
463
462
|
this.qrBase64 = url
|
464
|
-
this.qrCodeFlag = 1;
|
465
463
|
this.createQrLoginTimer();
|
466
464
|
})
|
467
465
|
},
|
@@ -484,7 +482,7 @@ export default {
|
|
484
482
|
},
|
485
483
|
clearQrLoginTimer() {
|
486
484
|
if (this.qrTimer1) {
|
487
|
-
|
485
|
+
clearTimeout(this.qrTimer1)
|
488
486
|
this.qrTimer1 = null;
|
489
487
|
}
|
490
488
|
if (this.qrTimer2) {
|
@@ -493,18 +491,21 @@ export default {
|
|
493
491
|
}
|
494
492
|
},
|
495
493
|
createQrLoginTimer() {
|
496
|
-
this.
|
497
|
-
this.checkQrLoginStatus();
|
498
|
-
}, 3000)
|
494
|
+
this.checkQrLoginTimerHanlde()
|
499
495
|
this.qrTimer2 = setTimeout(() => {
|
500
|
-
debugger
|
501
496
|
this.qrExpired = true;
|
502
497
|
this.clearQrLoginTimer();
|
503
|
-
},
|
498
|
+
}, 10000)
|
499
|
+
},
|
500
|
+
checkQrLoginTimerHanlde() {
|
501
|
+
this.qrTimer1 = setTimeout(() => {
|
502
|
+
this.checkQrLoginStatusHanlde();
|
503
|
+
}, 3000)
|
504
504
|
},
|
505
|
-
|
506
|
-
if (this.qrExpired)
|
507
|
-
|
505
|
+
checkQrLoginStatusHanlde() {
|
506
|
+
if (this.qrExpired) {
|
507
|
+
return
|
508
|
+
}
|
508
509
|
this.$http({
|
509
510
|
url: USER_PREFIX + '/auth/login',
|
510
511
|
method: `post`,
|
@@ -526,6 +527,8 @@ export default {
|
|
526
527
|
window.removeEventListener('keydown', this.keyDown, false);
|
527
528
|
this.handleRedirectUrl();
|
528
529
|
});
|
530
|
+
} else {
|
531
|
+
this.checkQrLoginTimerHanlde();
|
529
532
|
}
|
530
533
|
}
|
531
534
|
});
|