清新风格登录主题。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

116 lines
4.2 KiB

!(function () {
var Login = BI.inherit(BI.Widget, {
props: {
baseCls: "dec-login"
},
_store: function () {
return BI.Models.getModel("dec.model.login.fresh");
},
watch: {
},
render: function () {
var self = this, loginConfig = this.model.loginConfig;
// 调用自定义主题色,可以自行配置
BI.Services.getService("dec.service.login").initStyles();
return {
type: "bi.htape",
cls: "dec-login-fresh",
items: [{
type: "bi.default"
}, {
type: "bi.center_adapt",
width: 0.35,
cls: "login-area",
items: [{
type: "bi.absolute",
height: 480,
width: "100%",
items: [{
el: {
type: "bi.vtape",
items: [{
type: "bi.horizontal_auto",
height: 100,
items: [{
el: {
type: "bi.center_adapt",
items: [{
type: "bi.img",
src: BI.isEmpty(loginConfig.loginLogoImgId) ?
(Dec.resourceURL + "resources/logo_FR.png") : (Dec.fineServletURL + "/login/image/" + loginConfig.loginLogoImgId),
height: 50,
width: "auto"
}]
}
}, {
el: {
type: "bi.label",
height: 24,
cls: "dec-font-weight-bold",
text: loginConfig.loginTitle
},
tgap: 24
}],
ref: function (_ref) {
self.logo = _ref;
}
}, {
type: "dec.login.index",
listeners: [{
eventName: "EVENT_CHANGE",
action: function (v) {
self.logo.setVisible(v === DecCst.Login.Tabs.LOGIN);
}
}]
}]
}, top: 0, right: 89, bottom: 0, left: 89
}]
}]
}],
ref: function (_ref) {
self.loginBg = _ref;
}
};
},
mounted: function () {
var loginConfig = this.model.loginConfig;
// 使用用户自定义登录背景
if (loginConfig.loginImg) {
this.loginBg.element.css("backgroundImage", "url(" + Dec.fineServletURL + "/login/image/" + loginConfig.loginImgId + ")");
}
}
});
BI.shortcut("dec.login.fresh", Login);
})();
!(function () {
var Model = BI.inherit(Fix.Model, {
_init: function () {
this.loginConfigInfo = Dec.loginConfig || {};
},
state: function () {
return {};
},
computed: {
loginConfig: function () {
return this.loginConfigInfo;
}
},
actions: {}
});
BI.model("dec.model.login.fresh", Model);
})();
!(function () {
BI.config("dec.login", function (ob) {
return BI.extend(ob, {type: "dec.login.fresh"});
});
})();