|
@@ -216,7 +216,6 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
loginOut() {
|
|
|
- let lang = localStorage.getItem("lang");
|
|
|
this.$confirm(this.$t("是否要退出当前账号") + "?", this.$t("提示"), {
|
|
|
confirmButtonText: this.$t("确定"),
|
|
|
cancelButtonText: this.$t("取消"),
|
|
@@ -224,7 +223,6 @@ export default {
|
|
|
})
|
|
|
.then(() => {
|
|
|
sessionStorage.clear();
|
|
|
- localStorage.setItem("lang", lang);
|
|
|
this.$router.push("/");
|
|
|
location.reload();
|
|
|
})
|
|
@@ -284,6 +282,7 @@ export default {
|
|
|
this.languagename =
|
|
|
this.langusge.find((v) => v.languagecode == this.nowType)
|
|
|
.languagename || "简体中文";
|
|
|
+ localStorage.setItem("languagename", this.languagename);
|
|
|
this.editorChangeLanguage();
|
|
|
},
|
|
|
async changeLanguage(type) {
|
|
@@ -291,6 +290,7 @@ export default {
|
|
|
this.languagename =
|
|
|
this.langusge.find((v) => v.languagecode == this.nowType)
|
|
|
.languagename || "简体中文";
|
|
|
+ localStorage.setItem("languagename", this.languagename);
|
|
|
localStorage.setItem("lang", type);
|
|
|
this.$nextTick(() => {
|
|
|
this.$i18n.locale = type;
|
|
@@ -347,6 +347,12 @@ export default {
|
|
|
this.siteInfos();
|
|
|
this.languagelist();
|
|
|
|
|
|
+ try {
|
|
|
+ this.languagename = localStorage.getItem("languagename") || "简体中文";
|
|
|
+ } catch (error) {
|
|
|
+ this.languagename = "简体中文";
|
|
|
+ }
|
|
|
+
|
|
|
this.accountInfo = JSON.parse(sessionStorage.getItem("active_account"));
|
|
|
this.accountList = JSON.parse(
|
|
|
sessionStorage.getItem("account_list")
|