Prechádzať zdrojové kódy

11-15-18:02

当日保存
Sean 5 mesiacov pred
rodič
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=";

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 632 - 252
src/views/chat/hall.vue


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov