提交 b01c4767 编写于 作者: NoSubject's avatar NoSubject

sso.html引入sso.js文件

上级 47400a57
......@@ -78,11 +78,31 @@ o2.addReady(function () {
if (layout.config.app_protocol === "auto") {
layout.config.app_protocol = window.location.protocol;
}
o2.xDesktop.getServiceAddress(layout.config, function (service, center) {
layout.serviceAddressList = service;
layout.centerServer = center;
if (callback) callback();
}.bind(this));
if (layout.config.configMapping && (layout.config.configMapping[window.location.host] || layout.config.configMapping[window.location.hostname])){
var mapping = layout.config.configMapping[window.location.host] || layout.config.configMapping[window.location.hostname];
if (mapping.servers){
layout.serviceAddressList = mapping.servers;
layout.desktop.serviceAddressList = mapping.servers;
if (mapping.center) center = (o2.typeOf(mapping.center)==="array") ? mapping.center[0] : mapping.center;
layout.centerServer = center;
layout.desktop.centerServer = center;
if (callback) callback();
}else{
if (mapping.center) layout.config.center = (o2.typeOf(mapping.center)==="array") ? mapping.center : [mapping.center];
o2.xDesktop.getServiceAddress(layout.config, function (service, center) {
_setLayoutService(service, center);
_loadProgressBar();
if (callback) callback();
}.bind(this));
}
}else{
o2.xDesktop.getServiceAddress(layout.config, function (service, center) {
_setLayoutService(service, center);
_loadProgressBar();
if (callback) callback();
}.bind(this));
}
};
var _load = function () {
......
......@@ -5,7 +5,7 @@ layout.addReady(function(){
var _load = function(){
var host = o2.Actions.getHost("x_organization_assemble_authentication");
var url = host+"/x_organization_assemble_authentication/jaxrs/oauth/auth";
var toUri = new URI(url);
var toUri = new URI(o2.filterUrl(url));
toUri.setData(uri.getData());
toUri.go();
};
......
......@@ -5,7 +5,7 @@
<meta charset="UTF-8">
<title></title>
<script src="../o2_core/o2.min.js"></script>
<script src="../o2_lib/Decimal.js"></script>
<script src="js/sso.min.js"></script>
<script>
o2.addReady(function(){
o2.JSON.get("res/config/config.json", function(config){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册