Przeglądaj źródła

Merge branch 'fix/logout_huqi' into 'develop'

Merge of fix/logout_huqi to develop

See merge request o2oa/o2oa!44
胡起 5 lat temu
rodzic
commit
19cc2baa8b

+ 1 - 4
o2web/source/o2_core/o2/xDesktop/Authentication.js

@@ -84,10 +84,7 @@ MWF.xDesktop.Authentication = new Class({
                 this.socket.close();
                 this.socket = null;
             }
-            Cookie.dispose("x-token", {
-                "domain": ".ctc.com",
-                "path": "/"
-            });
+            Cookie.dispose("x-token");
             window.location.reload();
         }.bind(this));
     },

+ 11 - 0
o2web/source/o2_core/o2/xDesktop/Layout.js

@@ -1099,6 +1099,17 @@ MWF.xDesktop.Layout = new Class({
             this.messageAudio.play();
             this.playMessageAudioTime = new Date();
         }
+    },
+    logout: function(){
+        this.isLogout = true;
+
+        if (!this.notRecordStatus){
+            this.recordDesktopStatus(function(){
+                (layout.authentication ||  new o2.xDesktop.Authentication()).logout();
+            }.bind(this.layout));
+        }else{
+            (layout.authentication ||  new o2.xDesktop.Authentication()).logout();
+        }
     }
 });
 MWF.xDesktop.Layout.Taskitem = new Class({