From a6da9ef30581eec96d3bfe979c10bdd25ca92d6c Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期二, 18 十一月 2025 09:26:03 +0800
Subject: [PATCH] 标题

---
 src/views/login.vue |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/views/login.vue b/src/views/login.vue
index ba59cc7..5791eb1 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -7,7 +7,7 @@
             <div class="logo">
               <img src="../assets/icons/logo.png" alt="">
             </div>
-            <p class="title">杩愮淮鑰冩牳骞冲彴</p>
+            <p class="title">瑙嗛鍥惧儚缁煎悎绠$悊骞冲彴</p>
           </div>
           <div class="logo-wrapper">
             <img src="../assets/svg/login-box-bg.svg" alt="">
@@ -105,6 +105,7 @@
       loginInfo: {
         firstLogin: 1
       },
+      roles:[],
       newPassword: undefined,
       confirmPassword: undefined,
       loginRules: {
@@ -185,13 +186,15 @@
           this.$store.dispatch("Login", this.loginForm).then((res) => {
             getInfo().then(loginInfo => {
               this.loginInfo = loginInfo.user
+              this.roles = loginInfo.roles
               //濡傛灉杩斿洖涓�1姝e父璺宠浆
               if (this.loginInfo.firstLogin == 1) {
                 // this.$router.push({ path: "/" }).catch(() => { });
                 // return;
-                if (this.loginInfo.roles.includes("admin") || this.loginInfo.roles.includes("city_leader") || this.loginInfo.roles.includes("county_leader")) {
-                  this.$router.push({path: this.redirect || "/screen"}).catch(() => {
-                  });
+                if (this.roles .includes("admin") || this.roles .includes("city_leader")) {
+                  this.$router.push({
+                    path: '/screen'
+                  })
                 } else {
                   this.$router.push({path: this.redirect || "/index"}).catch(() => {
                   });

--
Gitblit v1.8.0