Ver Fonte

[Fix 0000] 修复了5.5主题样式失效的问题

houzekong há 3 meses atrás
pai
commit
7f15670b56
1 ficheiros alterados com 7 adições e 6 exclusões
  1. 7 6
      src/hooks/setting/index.ts

+ 7 - 6
src/hooks/setting/index.ts

@@ -30,7 +30,8 @@ const getUrl = () => {
             // getHomePath是以前的代码,留下做兼容,获取到一个默认的首页路径
             // 然后正常按配置走,默认使用上面的首页路径
             const homePathKey = data.result['defaultTheme'] ? data.result['defaultTheme'] : '';
-            homePath = data.result['systemHome'] ? data.result['systemHome'] : getHomePath(homePathKey);
+            const legacyHomePath = getHomePath(homePathKey);
+            homePath = data.result['systemHome'] ? data.result['systemHome'] : legacyHomePath;
             const faviconIcon = document.getElementById('faviconIcon');
             if (faviconIcon) {
               faviconIcon.setAttribute('href', `${VUE_APP_URL.baseUrl}/sys/common/static/${logoUrl}`);
@@ -47,11 +48,11 @@ const getUrl = () => {
 };
 
 export async function getRemoteSetting() {
-  if (!sysOrgCode) {
-    try {
-      await getUrl();
-    } catch (error) {}
-  }
+  // if (!sysOrgCode) {
+  try {
+    await getUrl();
+  } catch (error) {}
+  // }
 }
 
 export const useGlobSetting = (): Readonly<GlobConfig> => {