From e03866f401ea60dd770dbd52159b62a9f28c6920 Mon Sep 17 00:00:00 2001 From: ali <ali9696@163.com> Date: 星期四, 09 一月 2025 17:21:57 +0800 Subject: [PATCH] 修改登录页获取自定义配置 --- zhitan-vue/src/App.vue | 24 +++++++++++------------- 1 files changed, 11 insertions(+), 13 deletions(-) diff --git a/zhitan-vue/src/App.vue b/zhitan-vue/src/App.vue index 59e8fa6..2eff331 100644 --- a/zhitan-vue/src/App.vue +++ b/zhitan-vue/src/App.vue @@ -3,23 +3,21 @@ </template> <script setup> -// import Cookies from 'js-cookie' -import useSettingsStore from '@/store/modules/settings' -import { handleThemeStyle } from '@/utils/theme' -// import { systemName } from '@/api/system/name' +import Cookies from "js-cookie" +import useSettingsStore from "@/store/modules/settings" +import { handleThemeStyle } from "@/utils/theme" +import { systemName } from "@/api/system/name" onMounted(() => { nextTick(() => { // 鍒濆鍖栦富棰樻牱寮� handleThemeStyle(useSettingsStore().theme) - document.querySelector('body').className = 'themeDark'; + document.querySelector("body").className = "themeDark" }) - // systemName().then(res => { - // if (res.code == 200) { - // sessionStorage.setItem('SystemInfo', JSON.stringify(res.data)) - // // sessionStorage.removeItem('SystemInfo') - // } - // }) - - + systemName().then((res) => { + if (res.code == 200) { + Cookies.set("SystemInfo", JSON.stringify(res.data)) + // Cookies.remove('SystemInfo') + } + }) }) </script> -- Gitblit v1.9.3