From ddb1acce184e5b7487c9d19aef24d1ce8bf273da Mon Sep 17 00:00:00 2001 From: "@changcode" Date: Thu, 2 Dec 2021 10:44:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=202fa=E9=AA=8C=E8=AF=81=E7=99=BB=E9=99=86?= =?UTF-8?q?=E6=88=90=E5=8A=9F=E5=90=8E=EF=BC=8C=E4=BF=AE=E5=A4=8D=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E9=A2=9C=E8=89=B2=E7=B1=BB=E5=90=8D=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E8=B5=8B=E5=80=BC=E4=B8=BAnull?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/common/login.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nezha-fronted/src/components/common/login.vue b/nezha-fronted/src/components/common/login.vue index ca58a3688..8b9281fdd 100644 --- a/nezha-fronted/src/components/common/login.vue +++ b/nezha-fronted/src/components/common/login.vue @@ -113,7 +113,6 @@ import { mapActions } from 'vuex' import QRCode from 'qrcodejs2' import bus from '@/libs/bus.js' import { get } from '@/http' -import { loadI18n } from '@/components/common/i18n' export default { name: 'login', data () { @@ -134,6 +133,7 @@ export default { loading: false, lang: 'en', // en/cn verifyShow: false, + theme: 1, authBindShow: false, authToken: '', QRCode: '', @@ -160,6 +160,7 @@ export default { this.authToken = res.data.authToken this.lang = res.data.user.lang || localStorage.getItem('nz-language') this.$i18n.locale = this.lang + this.theme = res.data.user.theme // 获取可选语言 get('/sys/dict/all?type=lang').then(response => { if (response.code === 200) { @@ -216,7 +217,8 @@ export default { localStorage.setItem('nz-prometheus-federation-enabled', res.data.prometheusFederationEnabled) localStorage.setItem('nz-language', this.lang) res.data.user = { - lang: this.lang + lang: this.lang, + theme: this.theme } this.loginSuccess(res) } else {