Explorar el Código

修复路径转发bug

huqi hace 5 años
padre
commit
696da9e8c2
Se han modificado 1 ficheros con 12 adiciones y 3 borrados
  1. 12 3
      o2web/source/o2_core/o2.js

+ 12 - 3
o2web/source/o2_core/o2.js

@@ -274,9 +274,18 @@
         }
 
         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.config){
+            new Request.JSON({
+                url: "../x_desktop/res/config/config.json",
+                secure: false,
+                method: "get",
+                noCache: true,
+                async: false,
+                onSuccess: function(responseJSON, responseText){
+                    window.layout.config = responseJSON;
+                }.bind(this),
+            }).send();
+        }
 
         if (window.layout && layout.config && layout.config.urlMapping){
             for (var k in layout.config.urlMapping){