| | |
| | | uploadDialogVisible: false, |
| | | mfaDialogVisible: false, |
| | | licenseBase64: "", |
| | | brandLogo: "", |
| | | brandTitle: "", |
| | | brandCopyright: "", |
| | | titleClickCount: 0, |
| | | titleClickTimer: null, |
| | | loginForm: { |
| | |
| | | }, |
| | | created: function () { |
| | | this.initLanguageSwitch(); |
| | | this.loadBranding(); |
| | | }, |
| | | methods: { |
| | | text: function (key, fallback) { |
| | |
| | | } |
| | | 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 = { |