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

根据路径转发bug修复

上级 ae98bfdb
......@@ -273,6 +273,11 @@
}
}
if (!window.layout) window.layout = {};
if (!window.layout.config) o2.JSON.get("../x_desktop/res/config/config.json", function(config){
window.layout.config = config;
}, null, false);
if (window.layout && layout.config && layout.config.urlMapping){
for (var k in layout.config.urlMapping){
var regex = new RegExp(k);
......@@ -2253,4 +2258,4 @@ COMMON.DOM.addReady = o2.addReady;
MWF = o2;
MWF.getJSON = o2.JSON.get;
MWF.getJSONP = o2.JSON.getJsonp;
MWF.defaultPath = o2.session.path;
\ No newline at end of file
MWF.defaultPath = o2.session.path;
......@@ -96,7 +96,7 @@
}
var r = protocol + "//" + location.host + location.pathname;
r = r + "?oauth=" + oauth + "&qywx=true";
url += "&redirect_uri=" + encodeURIComponent(o2.filterUrl(r));
url += "&redirect_uri=" + encodeURIComponent(r);
window.location = url;
}.bind(this));
......@@ -110,7 +110,7 @@
}
var r = protocol + "//" + location.host + location.pathname;
r = r + "?oauth=" + oauth + "&dingding=true";
url += "&redirect_uri=" + encodeURIComponent(o2.filterUrl(r));
url += "&redirect_uri=" + encodeURIComponent(r);
window.location = url;
}.bind(this));
} else {
......@@ -121,7 +121,7 @@
r = r + "?oauth=" + oauth;
if (method) r = r + "&method=" + method;
if (redirect) r = r + "&redirect=" + redirect;
p = (p) ? p + "&redirect_uri=" + encodeURIComponent(o2.filterUrl(r)) : "&redirect_uri=" + encodeURIComponent(o2.filterUrl(r));
p = (p) ? p + "&redirect_uri=" + encodeURIComponent(r) : "&redirect_uri=" + encodeURIComponent(r);
url = (url.indexOf("?" === -1)) ? url + "?" + p : url + "&" + p;
window.location = url;
}.bind(this));
......@@ -304,4 +304,4 @@
<!--<div id="layout" style="overflow: auto; height:100%"></div>-->
</body>
</html>
</html>
\ No newline at end of file
......@@ -68,9 +68,11 @@
if (callback) callback(address);
}.bind(this));
}
o2.addReady(function(){
o2.JSON.get("res/config/config.json", function(config){
window.layout = {};
window.layout.config = config;
getServiceAddress(config, function(address){
var uri = new URI(window.location.toString());
var xtoken = uri.getData("SMAP_SESSION_DATA");
......
......@@ -79,7 +79,7 @@
if (xtoken){
var res = new Request.JSON({
//url: "http://hbxa01.bf.ctc.com:20080/x_organization_assemble_authentication/jaxrs/sso",
url: o2.filterUrl(address+"/jaxrs/sso"),
url: address+"/jaxrs/sso",
secure: false,
method: "POST",
noCache: true,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册