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 requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
|
||||||
const header = requireComponent.keys().length > 0 ? requireComponent("./license/LicenseMessage.vue") : {};
|
const header = requireComponent.keys().length > 0 ? requireComponent("./license/LicenseMessage.vue") : {};
|
||||||
|
const display = requireComponent.keys().length > 0 ? requireComponent("./display/Display.vue") : {};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'app',
|
name: 'app',
|
||||||
|
@ -56,6 +57,10 @@ export default {
|
||||||
if (header.default !== undefined) {
|
if (header.default !== undefined) {
|
||||||
this.licenseHeader = "LicenseMessage";
|
this.licenseHeader = "LicenseMessage";
|
||||||
}
|
}
|
||||||
|
// 是否显示校验信息
|
||||||
|
if (display.default !== undefined) {
|
||||||
|
display.default.valid(this);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
window.location.href = "/login"
|
window.location.href = "/login"
|
||||||
}
|
}
|
||||||
|
@ -63,15 +68,6 @@ export default {
|
||||||
window.location.href = "/login"
|
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: {
|
components: {
|
||||||
MsLanguageSwitch,
|
MsLanguageSwitch,
|
||||||
MsUser,
|
MsUser,
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 119a6892443b634a30d0d599ea51274d3c412372
|
Subproject commit b9091a47b197faef77c72b134b7cf604fe3209f0
|
|
@ -53,6 +53,8 @@
|
||||||
import {saveLocalStorage} from '@/common/js/utils';
|
import {saveLocalStorage} from '@/common/js/utils';
|
||||||
import {DEFAULT_LANGUAGE} from "@/common/js/constants";
|
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 {
|
export default {
|
||||||
name: "Login",
|
name: "Login",
|
||||||
|
@ -91,6 +93,11 @@ export default {
|
||||||
},
|
},
|
||||||
beforeCreate() {
|
beforeCreate() {
|
||||||
this.result = this.$get("/isLogin").then(response => {
|
this.result = this.$get("/isLogin").then(response => {
|
||||||
|
|
||||||
|
if (display.default !== undefined) {
|
||||||
|
display.default.valid(this);
|
||||||
|
}
|
||||||
|
|
||||||
if (!response.data.success) {
|
if (!response.data.success) {
|
||||||
if (response.data.message === 'sso') {
|
if (response.data.message === 'sso') {
|
||||||
window.location.href = "/sso/login"
|
window.location.href = "/sso/login"
|
||||||
|
@ -111,16 +118,6 @@ export default {
|
||||||
created: function () {
|
created: function () {
|
||||||
// 主页添加键盘事件,注意,不能直接在焦点事件上添加回车
|
// 主页添加键盘事件,注意,不能直接在焦点事件上添加回车
|
||||||
document.addEventListener("keydown", this.watchEnter);
|
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() {
|
destroyed() {
|
||||||
|
|
Loading…
Reference in New Issue