huaisianhuang 3 سال پیش
والد
کامیت
7dc8c35a85
1فایلهای تغییر یافته به همراه12 افزوده شده و 1 حذف شده
  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);
+      });
 });