diff --git a/tzipc-ui/src/views/login.vue b/tzipc-ui/src/views/login.vue index cc9b4bb..32b9122 100644 --- a/tzipc-ui/src/views/login.vue +++ b/tzipc-ui/src/views/login.vue @@ -146,11 +146,12 @@ export default { created() { this.getCode(); this.getCookie(); - }, methods: { getTitleBg() { - const theme = localStorage.getItem("data-theme") || 'redTheme' + const theme = localStorage.getItem("data-theme") || 'default' + window.document.documentElement.setAttribute('data-theme', theme) + window.document.documentElement.setAttribute('class', 'light') if (theme === 'default') return '/theme/default/loginTitle.png' if (theme === 'redTheme') return '/theme/redTheme/loginTitle.png' return '/theme/default/loginTitle.png'