huqi 5 лет назад
Родитель
Сommit
c4730ea699

+ 6 - 1
o2web/source/o2_core/o2.js

@@ -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;
+MWF.defaultPath = o2.session.path;

+ 4 - 4
o2web/source/x_desktop/oauth.html

@@ -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>

+ 3 - 1
o2web/source/x_desktop/smapsso.html

@@ -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");

+ 1 - 1
o2web/source/x_desktop/sso.html

@@ -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,