mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-15 23:47:33 +08:00
fix language always being set to English after logged out
This commit is contained in:
@@ -185,7 +185,10 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
self.$settings.setEnableApplicationLock(false);
|
||||
if (self.$settings.isEnableApplicationLock()) {
|
||||
self.$settings.setEnableApplicationLock(false);
|
||||
}
|
||||
|
||||
self.$user.updateTokenAndUserInfo(data.result);
|
||||
|
||||
if (self.$settings.isAutoUpdateExchangeRatesData()) {
|
||||
@@ -259,7 +262,10 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
self.$settings.setEnableApplicationLock(false);
|
||||
if (self.$settings.isEnableApplicationLock()) {
|
||||
self.$settings.setEnableApplicationLock(false);
|
||||
}
|
||||
|
||||
self.$user.updateTokenAndUserInfo(data.result);
|
||||
|
||||
if (self.$settings.isAutoUpdateExchangeRatesData()) {
|
||||
|
||||
@@ -185,8 +185,10 @@ export default {
|
||||
}
|
||||
|
||||
self.$user.clearTokenAndUserInfo();
|
||||
self.$settings.clearSettings();
|
||||
self.$exchangeRates.clearExchangeRates();
|
||||
self.$settings.clearSettings();
|
||||
self.$locale.init();
|
||||
|
||||
router.navigate('/');
|
||||
}).catch(error => {
|
||||
self.$logger.error('failed to log out', error);
|
||||
|
||||
@@ -157,7 +157,9 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
self.$settings.setEnableApplicationLock(false);
|
||||
if (self.$settings.isEnableApplicationLock()) {
|
||||
self.$settings.setEnableApplicationLock(false);
|
||||
}
|
||||
|
||||
if (self.$utilities.isString(data.result.token)) {
|
||||
self.$user.updateTokenAndUserInfo(data.result);
|
||||
|
||||
@@ -92,8 +92,9 @@ export default {
|
||||
const router = this.$f7router;
|
||||
|
||||
this.$user.clearTokenAndUserInfo();
|
||||
this.$settings.clearSettings();
|
||||
this.$exchangeRates.clearExchangeRates();
|
||||
this.$settings.clearSettings();
|
||||
this.$locale.init();
|
||||
|
||||
router.navigate('/login', {
|
||||
clearPreviousHistory: true
|
||||
|
||||
Reference in New Issue
Block a user