From 625e63cf1f3569645c917be79105dcd1705e823d Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Fri, 2 Feb 2024 17:16:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/login/login.vue | 17 ++--------------- pages/setup/setup.vue | 17 ++--------------- 2 files changed, 4 insertions(+), 30 deletions(-) diff --git a/pages/login/login.vue b/pages/login/login.vue index b0a75dff..10912189 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -389,7 +389,6 @@ // 多语言 system_locale: '', application_locale: '', - is_android: '', // 语言选择 popup_language_status: false, @@ -469,7 +468,6 @@ let system_info = uni.getSystemInfoSync(); this.system_locale = system_info.language; this.application_locale = app.globalData.get_language_value(); - this.is_android = system_info.platform.toLowerCase() === 'android'; uni.onLocaleChange((e) => { this.application_locale = e.locale; }); @@ -1611,19 +1609,8 @@ // 多语言切换 language_change(key) { - if (this.is_android) { - uni.showModal({ - content: this.$t('login.login.d9d11z'), - success: (res) => { - if (res.confirm) { - uni.setLocale(key); - } - }, - }); - } else { - uni.setLocale(key); - this.$i18n.locale = key; - } + uni.setLocale(key); + this.$i18n.locale = key; }, // 打开登录方式弹层 diff --git a/pages/setup/setup.vue b/pages/setup/setup.vue index 14bc6367..79b7f454 100644 --- a/pages/setup/setup.vue +++ b/pages/setup/setup.vue @@ -95,7 +95,6 @@ // 多语言 system_locale: '', application_locale: '', - is_android: '', home_use_multilingual_status: 0, // 语言选择 popup_language_status: false, @@ -118,7 +117,6 @@ let system_info = uni.getSystemInfoSync(); this.system_locale = system_info.language; this.application_locale = app.globalData.get_language_value(); - this.is_android = system_info.platform.toLowerCase() === 'android'; uni.onLocaleChange((e) => { this.application_locale = e.locale; }); @@ -246,19 +244,8 @@ // 多语言切换 language_change(key) { - if (this.is_android) { - uni.showModal({ - content: this.$t('login.login.d9d11z'), - success: (res) => { - if (res.confirm) { - uni.setLocale(key); - } - }, - }); - } else { - uni.setLocale(key); - this.$i18n.locale = key; - } + uni.setLocale(key); + this.$i18n.locale = key; }, }, };