Browse Source

提交开源任务材料

10.0
LAPTOP-SB56SG4Q\86185 3 years ago
parent
commit
f336803a9d
  1. 5
      README.md
  2. 18
      plugin.xml
  3. 37
      src/main/java/com/fr/plugin/dfui/webresource/WebResourceProvider.java
  4. 44
      src/main/resources/com/fr/plugin/dfui/css/plugin.css
  5. BIN
      src/main/resources/com/fr/plugin/dfui/image/1.1.png
  6. BIN
      src/main/resources/com/fr/plugin/dfui/image/1.png
  7. BIN
      src/main/resources/com/fr/plugin/dfui/image/2.2.png
  8. BIN
      src/main/resources/com/fr/plugin/dfui/image/2.png
  9. BIN
      src/main/resources/com/fr/plugin/dfui/image/3.3.png
  10. BIN
      src/main/resources/com/fr/plugin/dfui/image/3.png
  11. 662
      src/main/resources/com/fr/plugin/dfui/js/plugin.js
  12. BIN
      使用手册.docx

5
README.md

@ -1,3 +1,6 @@
# open-JSD-8481 # open-JSD-8481
JSD-8481 不同域名不同登录页 开源任务材料 JSD-8481 不同域名不同登录页 开源任务材料\
免责说明:该源码为第三方爱好者提供,不保证源码和方案的可靠性,也不提供任何形式的源码教学指导和协助!\
仅作为开发者学习参考使用!禁止用于任何商业用途!\
为保护开发者隐私,开发者信息已隐去!若原开发者希望公开自己的信息,可联系hugh处理。

18
plugin.xml

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><plugin>
<id>com.fr.plugin.dfui</id>
<name><![CDATA[登录UI]]></name>
<active>yes</active>
<version>1.0.4</version>
<env-version>10.0</env-version>
<jartime>2018-07-31</jartime>
<vendor>fr.open</vendor>
<description><![CDATA[登录UI]]></description>
<change-notes><![CDATA[
]]></change-notes>
<main-package>com.fr.plugin.dfui</main-package>
<extra-decision>
<WebResourceProvider class="com.fr.plugin.dfui.webresource.WebResourceProvider"/>
</extra-decision>
<function-recorder class="com.fr.plugin.dfui.webresource.WebResourceProvider"/>
</plugin>

37
src/main/java/com/fr/plugin/dfui/webresource/WebResourceProvider.java

@ -0,0 +1,37 @@
package com.fr.plugin.dfui.webresource;
import com.fr.decision.fun.impl.AbstractWebResourceProvider;
import com.fr.decision.web.LoginComponent;
import com.fr.decision.web.MainComponent;
import com.fr.plugin.transform.FunctionRecorder;
import com.fr.web.struct.Atom;
import com.fr.web.struct.Component;
import com.fr.web.struct.browser.RequestClient;
import com.fr.web.struct.category.ScriptPath;
import com.fr.web.struct.category.StylePath;
/**
* Created by zhouping on 2019/1/16.
*/
@FunctionRecorder
public class WebResourceProvider extends AbstractWebResourceProvider {
@Override
public Atom attach() {
return LoginComponent.KEY;
}
@Override
public Atom client() {
return new Component() {
@Override
public ScriptPath script(RequestClient requestClient) {
return ScriptPath.build("/com/fr/plugin/dfui/js/plugin.js");
}
@Override
public StylePath style(RequestClient requestClient) {
return StylePath.build("/com/fr/plugin/dfui/css/plugin.css");
}
};
}
}

44
src/main/resources/com/fr/plugin/dfui/css/plugin.css

@ -0,0 +1,44 @@
body {
color: #FBFBFB;
}
body input {
color: #9ea6b2;
}
.login-area {
max-width:80%
/*min-width: 270px;*/
/*max-width: 370px;*/
}
.login-area .edit-area {
background-color: rgba(17, 34, 78, 0.71);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b511224e,endColorstr=#b511224e);
border: 1px solid rgba(131, 194, 255, 0.22);
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
}
.login-area .edit-area .dec-login-demo-title {
font-size: 16px;
}
.login-area .edit-area .dec-login-item .bi-border-top.bi-text {
border-color: #3d4d66;
}
/*.dec-login-fresh {*/
/* !*background: url('resources?path=com/fr/plugin/dfui/image/1.png') no-repeat center center;*!*/
/* _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${fineServletURL}/resources?path=com/fr/plugin/dfui/image/1.png');*/
/* background-size: contain;*/
/* _background: none;*/
/*}*/
/*.dec-login-fresh.hack {*/
/* !*background: url('resources?path=com/fr/plugin/dfui/image/1.png') no-repeat center center;*!*/
/* _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${fineServletURL}/resources?path=com/fr/plugin/dfui/image/1.png');*/
/* _background: none;*/
/*}*/
/*.dec-login-fresh {*/
/* background-size: cover;*/
/*}*/

BIN
src/main/resources/com/fr/plugin/dfui/image/1.1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
src/main/resources/com/fr/plugin/dfui/image/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

BIN
src/main/resources/com/fr/plugin/dfui/image/2.2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
src/main/resources/com/fr/plugin/dfui/image/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

BIN
src/main/resources/com/fr/plugin/dfui/image/3.3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/main/resources/com/fr/plugin/dfui/image/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

662
src/main/resources/com/fr/plugin/dfui/js/plugin.js

@ -0,0 +1,662 @@
!(function () {
var e = BI.inherit(BI.Widget, {
props: {
baseCls: "dec-login-login"
},
_store: function () {
return BI.Models.getModel("dec.model.login.login")
},
watch: {
supportForgetPwd: function (e) {
this.forgetPasswordRow.setVisible(e)
},
needSlider: function (e) {
this.sliderMasker.setVisible(e)
}
},
render: function () {
var t = this;
this.options;
return {
type: "bi.absolute",
items: [{
el: {
type: "bi.vertical",
items: [
{
type: "dec.login.login.item",
$testId: "dec-login-username",
iconCls: "login-username-font",
watermark: BI.i18nText("Dec-User_Name"),
ref: function (e) {
t.usernameRow = e
}
}, {
type: "dec.login.login.item",
$testId: "dec-login-password",
iconCls: "login-password-font",
watermark: BI.i18nText("Dec-Password"),
inputType: "password",
ref: function (e) {
t.passwordRow = e
}
},
{
type: "bi.left_right_vertical_adapt",
bgap: 30,
items: {
left: [{
type: "bi.multi_select_item",
$testId: "dec-login-remember",
textLgap: 5,
iconWrapperWidth: 16,
height: 16,
text: BI.i18nText("Dec-Login_Remember"),
logic: {
dynamic: !0
},
ref: function (e) {
t.rememberRow = e
}
}
],
right: [{
type: "bi.button",
$testId: "dec-login-forget-password",
clear: !0,
height: 16,
invisible: !this.model.supportForgetPwd,
text: BI.i18nText("Dec-Basic_Forget_Password"),
ref: function (e) {
t.forgetPasswordRow = e
},
handler: function () {
t.store.setSelectedTab(DecCst.Login.Tabs.FORGET_PASSWORD)
}
}
].concat(this._createItems())
}
}, {
type: "bi.horizontal_auto",
items: [{
type: "bi.button",
cls: "login-button",
text: BI.i18nText("Dec-Basic_Login"),
width: 190,
height: 40,
handler: function () {
t._start()
}
}
]
}, {
el: {
type: "bi.vertical",
$testId: "dec-login-logged-chang-text",
cls: "login-error",
invisible: !0,
scrolly: !1,
items: [{
type: "bi.text",
tagName: "span",
whiteSpace: "normal",
text: BI.i18nText("Dec-Login_Other_Logged_Tip")
}, {
type: "bi.text",
$testId: "dec-login-logged-chang-password",
tagName: "span",
cls: "password-btn",
text: BI.i18nText("Dec-Login_Change_Password"),
handler: function () {
t.model.isNeedVerify ? t.store.setSelectedTab(DecCst.Login.Tabs.VERIFY_BING) : t.store.setSelectedTab(DecCst.Login.Tabs.PASSWORD_OLD)
}
}
],
ref: function (e) {
t.loginErrorRow = e
}
},
tgap: 20
}, {
el: {
type: "bi.text",
$testId: "dec-login-logged-text",
cls: "login-error",
invisible: !0,
whiteSpace: "normal",
text: BI.i18nText("Dec-Login_Normal_Other_Logged_Tip"),
ref: function (e) {
t.loginNormalErrorRow = e
}
},
tgap: 20
}
]
},
top: 0,
right: 40,
bottom: 0,
left: 40
},
{
el: {
type: "bi.center_adapt",
cls: "slider-masker",
invisible: !0,
items: [{
type: "dec.login.slider",
listeners: [{
eventName: "EVENT_SUCCESS",
action: function () {
t._start()
}
}, {
eventName: "EVENT_CLOSE",
action: function () {
t.store.resetSlider()
}
}
],
ref: function (e) {
t.sliderBar = e
}
}
],
ref: function (e) {
t.sliderMasker = e
}
},
top: 0,
right: 40,
bottom: 0,
left: 40
}
]
}
},
mounted: function () {
var t = this;
this.store.initData(),
this.element.keyup(function (e) {
13 === e.keyCode && t._start()
})
},
_createItems: function () {
return BI.map(BI.Constants.getConstant("dec.constant.login.way.extend"), function (e, t) {
return {
type: t.cardType
}
})
},
_start: function () {
var t = this,
e = this.usernameRow.getValue(),
i = this.passwordRow.getValue(),
n = this.rememberRow.isSelected() ? -2 : -1;
t.loginErrorRow.invisible(),
t.loginNormalErrorRow.invisible(),
"" !== e ? "" !== i ? (this.store.setLoginInfo({
username: e,
validity: n,
phone: "",
captcha: ""
}), this.store.login({
username: e,
password: this.passwordRow.getCipher(),
validity: n,
sliderToken: this.model.sliderToken,
origin: Dec.Utils.getUrlQuery("origin"),
encrypted: !0
}, function (e) {
t.store.resetSlider(),
e.data && e.data.accessToken ? t.fireEvent("EVENT_LOGIN", e.data) : BI.bind(BI.Services.getService("dec.service.login.login").getHandler(e.errorCode), t)(e)
})) : this.passwordRow.showError(BI.i18nText("Dec-Error_Password_Not_Null")) : this.usernameRow.showError(BI.i18nText("Dec-Error_Username_Not_Null"))
}
});
BI.shortcut("dec.login.login", e)
})();
!(function () {
var Login = BI.inherit(BI.Widget, {
props: {
baseCls: "dec-login"
},
_store: function () {
return BI.Models.getModel("dec.model.login.visual");
},
watch: {
},
render: function () {
var self = this, loginConfig = this.model.loginConfig;
// 调用自定义主题色,可以自行配置
BI.Services.getService("dec.service.login").initStyles();
return {
type: "bi.absolute",
cls: "dec-login-fresh",
items: [{
el:{
type:"bi.img",
src:"resources?path=com/fr/plugin/dfui/image/1.png",
width:"70%"
},top: 0, left: 0,
},{
el:{
type:"bi.absolute",
width:"30%",
items:[
{
el:{
type: "bi.center_adapt",
width: "100%",
items:[{
type:"bi.label",
text:"小康集团数据平台",
css: {color:"black","font-size":"3vw"}
}],
},top: "4%", right: 0
}
,
{
el: {
type: "bi.center_adapt",
width: "100%",
cls: "login-area",
items: [
{
type: "bi.absolute",
cls: "edit-area",
height: 350,
width: "100%",
items: [
{
el: {
type: "bi.horizontal_auto",
height: 100,
items: [
{
el: {
type: "bi.center_adapt",
items: [{
type: "bi.img",
src: "resources?path=com/fr/plugin/dfui/image/1.1.png",
height: 50,
width: "auto"
}]
}
}, {
el: {
type: "bi.label",
height: 24,
cls: "dec-login-visual-title",
text: ""
},
tgap: 5
}],
ref: function (_ref) {
self.logo = _ref;
}
}, top: 30, right: 0, left: 0
},
{
el: {
type: "dec.login.index",
listeners: [{
eventName: "EVENT_CHANGE",
action: function (v) {
self.logo.setVisible(v === DecCst.Login.Tabs.LOGIN);
}
}]
}, top: 85, right: 0, bottom: 0, left: 0
}]
}]
}, top: 0, right: '10%', bottom: 0
},
{
el:{
type: "bi.center_adapt",
width: "100%",
items:[{
type:"bi.label",
text:"© 2021 重庆小康工业集团股份有限公司",
css: {color:"rgb(126,126,126)","font-size":"1vw"}
}]
},bottom: "8%", right: 0
}
]
},top:0,right:0,bottom:0
}
],
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.visual1", Login);
})();
!(function () {
var Login = BI.inherit(BI.Widget, {
props: {
baseCls: "dec-login"
},
_store: function () {
return BI.Models.getModel("dec.model.login.visual");
},
watch: {
},
render: function () {
var self = this, loginConfig = this.model.loginConfig;
// 调用自定义主题色,可以自行配置
BI.Services.getService("dec.service.login").initStyles();
return {
type: "bi.absolute",
cls: "dec-login-fresh",
items: [{
el:{
type:"bi.img",
src:"resources?path=com/fr/plugin/dfui/image/2.png",
width:"70%"
},top: 0, left: 0,
},{
el:{
type:"bi.absolute",
width:"30%",
items:[
{
el:{
type: "bi.center_adapt",
width: "100%",
items:[{
type:"bi.label",
text:"东风小康数据平台",
css: {color:"black","font-size":"3vw"}
}],
},top: "5%", right: 0
}
,
{
el: {
type: "bi.center_adapt",
width: "100%",
cls: "login-area",
items: [
{
type: "bi.absolute",
cls: "edit-area",
height: 440,
width: "100%",
items: [{
el: {
type: "bi.horizontal_auto",
height: 100,
items: [
{
el: {
type: "bi.center_adapt",
items: [{
type: "bi.img",
src: "resources?path=com/fr/plugin/dfui/image/2.2.png",
height: 50,
width: "auto"
}]
}
}, {
el: {
type: "bi.label",
height: 24,
cls: "dec-login-visual-title",
text: ""
},
tgap: 5
}],
ref: function (_ref) {
self.logo = _ref;
}
}, top: 30, right: 0, left: 0
}, {
el: {
type: "dec.login.index",
listeners: [{
eventName: "EVENT_CHANGE",
action: function (v) {
self.logo.setVisible(v === DecCst.Login.Tabs.LOGIN);
}
}]
}, top: 85, right: 0, bottom: 0, left: 0
}]
}]
}, top: 0, right: "10%", bottom: 0
},
{
el:{
type: "bi.center_adapt",
width: "100%",
items:[{
type:"bi.label",
text:"© 2021 东风小康汽车有限公司",
css: {color:"rgb(126,126,126)","font-size":"1vw"}
}]
},bottom: "10%", right: 0
}
]
},top:0,right:0,bottom:0
}
],
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.visual2", Login);
})();
!(function () {
var Login = BI.inherit(BI.Widget, {
props: {
baseCls: "dec-login"
},
_store: function () {
return BI.Models.getModel("dec.model.login.visual");
},
watch: {
},
render: function () {
var self = this, loginConfig = this.model.loginConfig;
// 调用自定义主题色,可以自行配置
BI.Services.getService("dec.service.login").initStyles();
return {
type: "bi.absolute",
cls: "dec-login-fresh",
items: [{
el:{
type:"bi.img",
src:"resources?path=com/fr/plugin/dfui/image/3.png",
width:"70%"
},top: 0, left: 0,
},{
el:{
type:"bi.absolute",
width:"30%",
items:[
{
el:{
type: "bi.center_adapt",
width: "100%",
items:[{
type:"bi.label",
text:"金康赛力斯数据平台",
css: {color:"black","font-size":"3vw"}
}],
},top: "5%", right: 0
}
,
{
el: {
type: "bi.center_adapt",
width: "100%",
cls: "login-area",
items: [
{
type: "bi.absolute",
cls: "edit-area",
height: 440,
width: "100%",
items: [{
el: {
type: "bi.horizontal_auto",
height: 100,
items: [
{
el: {
type: "bi.center_adapt",
items: [{
type: "bi.img",
src: "resources?path=com/fr/plugin/dfui/image/3.3.png",
height: 50,
width: "auto"
}]
}
}, {
el: {
type: "bi.label",
height: 24,
cls: "dec-login-visual-title",
text: ""
},
tgap: 5
}],
ref: function (_ref) {
self.logo = _ref;
}
}, top: 30, right: 0, left: 0
}, {
el: {
type: "dec.login.index",
listeners: [{
eventName: "EVENT_CHANGE",
action: function (v) {
self.logo.setVisible(v === DecCst.Login.Tabs.LOGIN);
}
}]
}, top: 85, right: 0, bottom: 0, left: 0
}]
}]
}, top: 0, right: "10%", bottom: 0
},
{
el:{
type: "bi.center_adapt",
width: "100%",
items:[{
type:"bi.label",
text:"© 2021 重庆金康新能源汽车有限公司",
css: {color:"rgb(126,126,126)","font-size":"1vw"}
}]
},bottom: "10%", right: 0
}
]
},top:0,right:0,bottom:0
}
],
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.visual3", 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.visual", Model);
})();
!(function () {
var url = window.location.href;
var visual = "dec.login.visual1";
if(url.indexOf("bi.sokon.com") != -1){
visual= "dec.login.visual1";
}
if(url.indexOf("bi.dfsk.com.cn") != -1){
visual= "dec.login.visual2";
}
if(url.indexOf("bi.seres.cn") != -1){
visual= "dec.login.visual3";
}
BI.config("dec.login", function (ob) {
return BI.extend(ob, {type: visual});
});
})();

BIN
使用手册.docx

Binary file not shown.
Loading…
Cancel
Save