mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-04 21:19:52 +08:00
refactor(系统设置): 显示设置
This commit is contained in:
parent
9aeed6b027
commit
3a311dba44
@ -34,6 +34,7 @@ import {saveLocalStorage} from "@/common/js/utils";
|
||||
|
||||
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
|
||||
const header = requireComponent.keys().length > 0 ? requireComponent("./license/LicenseMessage.vue") : {};
|
||||
const display = requireComponent.keys().length > 0 ? requireComponent("./display/Display.vue") : {};
|
||||
|
||||
export default {
|
||||
name: 'app',
|
||||
@ -56,6 +57,10 @@ export default {
|
||||
if (header.default !== undefined) {
|
||||
this.licenseHeader = "LicenseMessage";
|
||||
}
|
||||
// 是否显示校验信息
|
||||
if (display.default !== undefined) {
|
||||
display.default.valid(this);
|
||||
}
|
||||
} else {
|
||||
window.location.href = "/login"
|
||||
}
|
||||
@ -63,15 +68,6 @@ export default {
|
||||
window.location.href = "/login"
|
||||
});
|
||||
},
|
||||
created() {
|
||||
this.$get("/display/info", response => {
|
||||
this.logoId = response.data[0].paramValue;
|
||||
let title = response.data[4].paramValue;
|
||||
if (title) {
|
||||
document.title = title;
|
||||
}
|
||||
})
|
||||
},
|
||||
components: {
|
||||
MsLanguageSwitch,
|
||||
MsUser,
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 119a6892443b634a30d0d599ea51274d3c412372
|
||||
Subproject commit b9091a47b197faef77c72b134b7cf604fe3209f0
|
@ -53,6 +53,8 @@
|
||||
import {saveLocalStorage} from '@/common/js/utils';
|
||||
import {DEFAULT_LANGUAGE} from "@/common/js/constants";
|
||||
|
||||
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
|
||||
const display = requireComponent.keys().length > 0 ? requireComponent("./display/Display.vue") : {};
|
||||
|
||||
export default {
|
||||
name: "Login",
|
||||
@ -91,6 +93,11 @@ export default {
|
||||
},
|
||||
beforeCreate() {
|
||||
this.result = this.$get("/isLogin").then(response => {
|
||||
|
||||
if (display.default !== undefined) {
|
||||
display.default.valid(this);
|
||||
}
|
||||
|
||||
if (!response.data.success) {
|
||||
if (response.data.message === 'sso') {
|
||||
window.location.href = "/sso/login"
|
||||
@ -111,16 +118,6 @@ export default {
|
||||
created: function () {
|
||||
// 主页添加键盘事件,注意,不能直接在焦点事件上添加回车
|
||||
document.addEventListener("keydown", this.watchEnter);
|
||||
|
||||
this.result = this.$get("/display/info", response => {
|
||||
this.loginLogoId = response.data[1].paramValue;
|
||||
this.loginImageId = response.data[2].paramValue;
|
||||
|
||||
let loginTitle = response.data[3].paramValue;
|
||||
if (loginTitle) {
|
||||
document.title = loginTitle;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
destroyed() {
|
||||
|
Loading…
Reference in New Issue
Block a user