Commit 03993290 authored by 朱国瑞's avatar 朱国瑞

语言不对的问题

parent ed40b35e
...@@ -104,6 +104,15 @@ export default { ...@@ -104,6 +104,15 @@ export default {
this.showPopup = !this.showPopup; this.showPopup = !this.showPopup;
}, },
setLanguagePack() { setLanguagePack() {
let lang = "en";
if (this.currentLanguage === 0) {
lang = "en";
} else if (this.currentLanguage === 1) {
lang = "fr";
} else if (this.currentLanguage === 2) {
lang = "es";
}
localStorage.setItem("lang", lang);
let _languagePack = { let _languagePack = {
tipsString: { tipsString: {
initInitial: "请调整姿势", initInitial: "请调整姿势",
...@@ -617,8 +626,8 @@ export default { ...@@ -617,8 +626,8 @@ export default {
} else if (index === 2) { } else if (index === 2) {
lang = "es"; lang = "es";
} }
localStorage.setItem("lang", lang);
this.$i18n.locale = lang; this.$i18n.locale = lang;
localStorage.setItem("lang", lang);
}, },
async clickAuthCamera() { async clickAuthCamera() {
this.setLanguagePack(); this.setLanguagePack();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment