lrf vor 1 Jahr
Ursprung
Commit
4c092f0f7d
1 geänderte Dateien mit 13 neuen und 7 gelöschten Zeilen
  1. 13 7
      layout/admin/navBar.vue

+ 13 - 7
layout/admin/navBar.vue

@@ -86,13 +86,19 @@ export default {
     ...mapActions(['login', 'update', 'getQrcode', 'logout']),
     async toLogout() {
       // 云就业退出
-      await this.logout(this.user.id);
-      this.deleteUser();
-      this.$notify({
-        title: '注销成功',
-        type: 'success',
-      });
-      this.toLogin();
+      const res = await this.logout(this.user.id);
+      console.log(res);
+      if (res.data) {
+        this.deleteUser();
+        this.$notify({
+          title: '注销成功',
+          type: 'success',
+        });
+        console.log(res.data);
+        window.location.replace(res.data);
+      }
+
+      // this.toLogin();
     },
     handleCommand(type) {
       if (type === 'logout') this.toLogout();