From da47a3349dcfd87db23ab8e64fbf35fe1aea5685 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期四, 14 十一月 2024 16:52:21 +0800
Subject: [PATCH] 预测项数据

---
 src/views/Login/components/LoginForm.vue |   23 ++++++++---------------
 1 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/src/views/Login/components/LoginForm.vue b/src/views/Login/components/LoginForm.vue
index 7b161e3..22a80b2 100644
--- a/src/views/Login/components/LoginForm.vue
+++ b/src/views/Login/components/LoginForm.vue
@@ -100,13 +100,12 @@
 defineOptions({ name: 'LoginForm' })
 
 const { t } = useI18n()
-const message = useMessage()
 const iconHouse = useIcon({ icon: 'ep:house' })
 const iconAvatar = useIcon({ icon: 'ep:avatar' })
 const iconLock = useIcon({ icon: 'ep:lock' })
 const formLogin = ref()
 const { validForm } = useFormValid(formLogin)
-const { setLoginState, getLoginState } = useLoginState()
+const { getLoginState } = useLoginState()
 const { currentRoute, push } = useRouter()
 const permissionStore = usePermissionStore()
 const redirect = ref<string>('')
@@ -201,20 +200,14 @@
     }
     authUtil.setToken(res)
     if (!redirect.value) {
-      redirect.value = '/'
+      redirect.value = '/index'
     }
-    let tenantId = authUtil.getTenantId()
-    // if(tenantId != 1) {
-    //   //只要不是系统租户,登录成功跳转到home2页面
-    //   window.location.href = '/home2'
-    // } else {
-      // 判断是否为SSO登录
-      if (redirect.value.indexOf('sso') !== -1) {
-        window.location.href = window.location.href.replace('/login?redirect=', '')
-      } else {
-        push({ path: redirect.value || permissionStore.addRouters[0].path })
-      }
-    // }
+    // 判断是否为SSO登录
+    if (redirect.value.indexOf('sso') !== -1) {
+      window.location.href = window.location.href.replace('/login?redirect=', '')
+    } else {
+      push({ path: redirect.value || permissionStore.addRouters[0].path })
+    }
   } finally {
     loginLoading.value = false
     loading.value.close()

--
Gitblit v1.9.3