Ver código fonte

11-15-18:02

当日保存
Sean 5 meses atrás
pai
commit
79a3dbcd5a
3 arquivos alterados com 643 adições e 259 exclusões
  1. BIN
      src/assets/chat/notice.png
  2. 11 7
      src/layout/components/Navbar.vue
  3. 632 252
      src/views/chat/hall.vue

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=";

Diferenças do arquivo suprimidas por serem muito extensas
+ 632 - 252
src/views/chat/hall.vue


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff