Просмотр исходного кода

待办回刷重定向参数的获取

unknown 5 лет назад
Родитель
Сommit
8b4761d3b4
2 измененных файлов с 10 добавлено и 4 удалено
  1. 2 2
      o2web/source/o2_core/o2/xDesktop/Common.js
  2. 8 2
      o2web/source/x_desktop/smapsso.html

+ 2 - 2
o2web/source/o2_core/o2/xDesktop/Common.js

@@ -493,13 +493,13 @@ MWF.xDesktop.getServiceAddressConfigArray = function(config, callback, error) {
         requests.push(
             MWF.xDesktop.getServiceAddressConfigObject(center, function(serviceAddressList, center){
                 requests.each(function(res){
-                    if (res) if (res.isRunning()){res.cancel();}
+                    if (res) if (res.isRunning && res.isRunning()){res.cancel();}
                 });
                 if (callback) callback(serviceAddressList, center);
             }.bind(this), function(){
                 if (requests.length){
                     for (var i=0; i<requests.length; i++){
-                        if (requests[i].isRunning()) return "";
+                        if (requests[i].isRunning && requests[i].isRunning()) return "";
                     }
                 }
                 if (error) error();

+ 8 - 2
o2web/source/x_desktop/smapsso.html

@@ -38,7 +38,7 @@
                 requests.push(
                         getServiceAddressConfigObject(function(address){
                             requests.each(function(res){
-                                if (res.isRunning()){res.cancel();}
+                                if (res.isRunning && res.isRunning()){res.cancel();}
                             });
                             if (callback) callback(address);
                         }.bind(this), center)
@@ -74,12 +74,18 @@
                 window.layout = {};
                 window.layout.config = config;
                 getServiceAddress(config, function(address){
+                    debugger;
                     var uri = new URI(window.location.toString());
                     var xtoken = uri.getData("SMAP_SESSION_DATA");
                     var appID = uri.getData("appID");
                     var uniqueId = uri.getData("uniqueId");
+                    var flushPortalUrl = uri.getData("flushPortalUrl") || "";
+                    if( flushPortalUrl && flushPortalUrl.indexOf("%2F") === -1 ){
+                        flushPortalUrl = encodeURIComponent(flushPortalUrl);
+                    }
                     var redirect = uri.getData("redirect");
-                    redirect = redirect + "&uniqueId=" + uniqueId;
+                    redirect = redirect + "&uniqueId=" + uniqueId + "&flushPortalUrl="+flushPortalUrl;
+                    window.open( redirect, "_new");
                     if (xtoken){
                         var res = new Request.JSON({
                             url: o2.filterUrl(address+"?SMAP_SESSION_DATA="+encodeURIComponent(xtoken)+"&appID="+appID+"&date="+(new Date()).getTime()),