show confirm dialog before re-login

This commit is contained in:
MaysWind
2020-11-23 23:40:48 +08:00
parent 63499c35dd
commit 48708a5d8e
3 changed files with 12 additions and 7 deletions
+10 -7
View File
@@ -108,15 +108,18 @@ export default {
}
},
relogin() {
const router = this.$f7router;
const self = this;
const router = self.$f7router;
this.$user.clearTokenAndUserInfo();
this.$exchangeRates.clearExchangeRates();
this.$settings.clearSettings();
this.$locale.init();
self.$confirm('Are you sure you want to re-login?', () => {
self.$user.clearTokenAndUserInfo();
self.$exchangeRates.clearExchangeRates();
self.$settings.clearSettings();
self.$locale.init();
router.navigate('/login', {
clearPreviousHistory: true
router.navigate('/login', {
clearPreviousHistory: true
});
});
}
}