Sean 5 сар өмнө
parent
commit
79a3dbcd5a

BIN
src/assets/chat/notice.png


+ 11 - 7
src/layout/components/Navbar.vue

@@ -67,6 +67,8 @@ import Screenfull from '@/components/Screenfull'
 import SizeSelect from '@/components/SizeSelect'
 import LangSelect from '@/components/LangSelect'
 import Search from '@/components/HeaderSearch'
+import axios from 'axios';
+
 
 export default {
   components: {
@@ -92,18 +94,20 @@ export default {
     // async logout() {
     //   await this.$store.dispatch('user/logout')
     //   this.$router.push(`/login?redirect=${this.$route.fullPath}`)
-    // }
+    // },
     logout() {
       const token = this.getTokenFromCookie(); // 获取 token
-      this.$store.commit("user/LOGOUT");
-      this.$router.push(`/`);
-
-      // 单点登录退出
-      this.$store.dispatch('public/logoutapi', { token: token }).then(response => {
+      
+      axios.get('http://admindev.bjzxtw.org.cn/auth/logoutapi.php', {params:{token:token} }).then(response => {
         console.log(response);
+        this.$store.commit("user/LOGOUT");
+        this.$router.push(`/login`);
       }).catch(error => {
         console.log(error);
-      });
+        this.$store.commit("user/LOGOUT");
+        this.$router.push(`/login`);
+        this.$message.error(response.message);
+      }); 
     },
     getTokenFromCookie() {
       const name = "Admin-Token=";

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 632 - 252
src/views/chat/hall.vue


Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно