From 3f27ed72e2a9fb9c3788be22a3c878c10950bfc0 Mon Sep 17 00:00:00 2001 From: Suwings Date: Sun, 23 Jan 2022 19:34:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E8=87=AA=E5=8A=A8=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/views/Login.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/views/Login.vue b/src/app/views/Login.vue index 02cda52..e9a9b61 100644 --- a/src/app/views/Login.vue +++ b/src/app/views/Login.vue @@ -134,6 +134,7 @@ import Panel from "../../components/Panel"; // import router from "../router"; import { API_USER_LOGIN, sleep } from "../service/common"; import { request, setupUserInfo } from "../service/protocol"; + export default { components: { Panel }, data: function () { @@ -214,7 +215,12 @@ export default { }, async mounted() { console.log("Welcome use MCSManager."); - console.log("Copyright 2021 Suwings All rights reserved."); + console.log("Copyright 2022 Suwings All rights reserved."); + await setupUserInfo(); + if (this.$store.state?.userInfo?.uuid) { + console.log("用户已登录,正在跳转"); + window.location.href = "/"; + } } };