浏览代码

11-15-18:02

当日保存
Sean 5 月之前
父节点
当前提交
79a3dbcd5a
共有 3 个文件被更改,包括 643 次插入259 次删除
  1. 二进制
      src/assets/chat/notice.png
  2. 11 7
      src/layout/components/Navbar.vue
  3. 632 252
      src/views/chat/hall.vue

二进制
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


部分文件因为文件数量过多而无法显示