From f5271e281d0d2073d26c6c74daf8ae7d0c87b68e Mon Sep 17 00:00:00 2001 From: liuyusheng Date: Tue, 15 Oct 2024 10:25:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E9=A1=B5=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- imt-ui/src/views/login.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/imt-ui/src/views/login.vue b/imt-ui/src/views/login.vue index e65c809..9ad9293 100644 --- a/imt-ui/src/views/login.vue +++ b/imt-ui/src/views/login.vue @@ -216,6 +216,7 @@ import { import Verify from "@/components/Verifition/Verify"; import { resetUserPwd } from "@/api/system/user"; +import { getUserProfile } from "@/api/system/user"; export default { name: "Login", @@ -361,7 +362,15 @@ export default { this.loginForm ) .then(() => { - this.$router.push({ path: this.redirect || "/" }).catch(() => {}); + + getUserProfile().then(res=>{ + if (res.data.tenantId == "1"){ + this.$router.push({ path: this.redirect || "/" }).catch(()=>{}); + }else { + this.$router.push("/equip/equipdashboard").catch(()=>{}); + } + }) + // this.$router.push({ path: this.redirect || "/" }).catch(() => {}); }) .catch(() => { this.loading = false;