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/static/js/login/login.js | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/src/main/webapp/static/js/login/login.js b/src/main/webapp/static/js/login/login.js
index 2fb1a1b..796b5eb 100644
--- a/src/main/webapp/static/js/login/login.js
+++ b/src/main/webapp/static/js/login/login.js
@@ -18,6 +18,9 @@
uploadDialogVisible: false,
mfaDialogVisible: false,
licenseBase64: "",
+ brandLogo: "",
+ brandTitle: "",
+ brandCopyright: "",
titleClickCount: 0,
titleClickTimer: null,
loginForm: {
@@ -64,6 +67,7 @@
},
created: function () {
this.initLanguageSwitch();
+ this.loadBranding();
},
methods: {
text: function (key, fallback) {
@@ -77,6 +81,27 @@
}
return fallback || key;
},
+ loadBranding: function () {
+ var that = this;
+ $.ajax({
+ url: baseUrl + "/openapi/getBranding",
+ 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 = 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();
+ }
+ }
+ }
+ });
+ },
refreshRuleMessages: function () {
var vm = this;
vm.loginRules = {
--
Gitblit v1.9.1