huaisianhuang před 3 roky
rodič
revize
7dc8c35a85
1 změnil soubory, kde provedl 12 přidání a 1 odebrání
  1. 12 1
      html/static/common.js

+ 12 - 1
html/static/common.js

@@ -1,3 +1,14 @@
 $(".btn-logout").click(function() { 
-    window.location.href = 'index.html';
+    axios({
+        method: 'get',
+        url: 'https://www.choozmo.com:8887/logout',
+        headers: { 
+            'accept': 'application/json',
+         }
+      }).then(res => {
+        console.log(res.data);
+        window.location.href = 'index.html';
+      }).catch(err => {
+        console.log(err);
+      });
 });