From 5447ff1e5abeb1d45c9e331f78a0e523695b2561 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期二, 05 五月 2026 16:02:12 +0800
Subject: [PATCH] #WCS系统自定义上传LOGO、标题、名称V3.0.1.8

---
 src/main/webapp/views/index.html |   34 ++++++++++++++++++++++++++++++----
 1 files changed, 30 insertions(+), 4 deletions(-)

diff --git a/src/main/webapp/views/index.html b/src/main/webapp/views/index.html
index 7f4c3e4..6be5835 100644
--- a/src/main/webapp/views/index.html
+++ b/src/main/webapp/views/index.html
@@ -638,7 +638,7 @@
         :class="{ 'is-animating': collapseAnimating }"
         :width="asideWidth">
       <div class="aside-logo" :class="{ 'is-collapse': asideCompact }">
-        <img class="aside-logo-image" src="../static/images/zy-logo.png" alt="娴欐睙涓壃">
+        <img class="aside-logo-image" :src="brandLogo || '../static/images/zy-logo.png'" alt="Logo">
       </div>
 
       <transition name="aside-fade">
@@ -703,7 +703,7 @@
 
       <transition name="aside-fade">
         <div class="aside-footer" v-show="showAsideExtras">
-          <div class="aside-footer-copy">漏 2026 {{ t('app.company') }}</div>
+          <div class="aside-footer-copy">{{ brandCopyright || ('漏 2026 ' + t('app.company')) }}</div>
           <div class="aside-footer-version">
             <span class="aside-footer-version-text">{{ versionText }}</span>
             <el-tag
@@ -964,7 +964,10 @@
         userName: localStorage.getItem(USER_STORAGE_KEY) || (window.WCS_I18N ? window.WCS_I18N.tl("绠$悊鍛�") : "绠$悊鍛�"),
         aiAssistantVisible: false,
         aiAssistantMounted: false,
-        aiAssistantSrc: baseUrl + "/views/ai/diagnosis.html"
+        aiAssistantSrc: baseUrl + "/views/ai/diagnosis.html",
+        brandLogo: "",
+        brandTitle: "",
+        brandCopyright: ""
       };
     },
     computed: {
@@ -1081,6 +1084,7 @@
       this.bindI18n();
       this.installCompatBridge();
       this.loadSystemVersion();
+      this.loadBranding();
       this.loadMenu();
       this.loadLicenseDays();
       this.checkFakeStatus();
@@ -1288,7 +1292,7 @@
         tab.group = this.tl(tab.group);
       },
       updateDocumentTitle: function (title) {
-        document.title = title + " - " + this.t("app.title");
+        document.title = title + " - " + (this.brandTitle || this.t("app.title"));
       },
       resolveMenuIcon: function (code) {
         var iconMap = {
@@ -1893,6 +1897,28 @@
           }
         });
       },
+      loadBranding: function () {
+        var that = this;
+        $.ajax({
+          url: baseUrl + "/openapi/getBranding",
+          headers: { token: localStorage.getItem("token") },
+          method: "GET",
+          success: function (res) {
+            if (res.code === 200 && res.data) {
+              that.brandLogo = res.data.logo || "";
+              that.brandTitle = res.data.title || "";
+              that.brandCopyright = res.data.copyright || "";
+              if (res.data.title) {
+                document.title = that.activeTabTitle + " - " + res.data.title;
+              }
+              if (res.data.logo) {
+                var link = document.querySelector('link[rel="icon"]');
+                if (link) link.href = res.data.logo.indexOf("data:") === 0 ? res.data.logo : res.data.logo + "?v=" + Date.now();
+              }
+            }
+          }
+        });
+      },
       loadLicenseDays: function () {
         var that = this;
         $.ajax({

--
Gitblit v1.9.1