From 1249c7ca26491a51c1cf87aea1d277b6fedf30ab Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期二, 15 十二月 2020 10:25:00 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue

---
 ruoyi-ui/src/permission.js   |   14 ++------------
 README.md                    |    2 ++
 ruoyi-ui/src/views/login.vue |   15 ++++++---------
 3 files changed, 10 insertions(+), 21 deletions(-)

diff --git a/README.md b/README.md
index 155c4c7..95ffef4 100644
--- a/README.md
+++ b/README.md
@@ -21,6 +21,8 @@
 
 ## 骞冲彴绠�浠�
 
+鑻ヤ緷鏄竴濂楀叏閮ㄥ紑婧愮殑蹇�熷紑鍙戝钩鍙帮紝姣棤淇濈暀缁欎釜浜哄強浼佷笟鍏嶈垂浣跨敤銆�
+
 * 鍓嶇閲囩敤Vue銆丒lement UI銆�
 * 鍚庣閲囩敤Spring Boot銆丼pring Security銆丷edis & Jwt銆�
 * 鏉冮檺璁よ瘉浣跨敤Jwt锛屾敮鎸佸缁堢璁よ瘉绯荤粺銆�
diff --git a/ruoyi-ui/src/permission.js b/ruoyi-ui/src/permission.js
index 00c2f3e..6a2ec21 100644
--- a/ruoyi-ui/src/permission.js
+++ b/ruoyi-ui/src/permission.js
@@ -23,28 +23,18 @@
           // 鎷夊彇user_info
           const roles = res.roles
           store.dispatch('GenerateRoutes', { roles }).then(accessRoutes => {
-          // 娴嬭瘯 榛樿闈欐�侀〉闈�
-          // store.dispatch('permission/generateRoutes', { roles }).then(accessRoutes => {
             // 鏍规嵁roles鏉冮檺鐢熸垚鍙闂殑璺敱琛�
             router.addRoutes(accessRoutes) // 鍔ㄦ�佹坊鍔犲彲璁块棶璺敱琛�
             next({ ...to, replace: true }) // hack鏂规硶 纭繚addRoutes宸插畬鎴�
           })
-        })
-          .catch(err => {
-            store.dispatch('FedLogOut').then(() => {
+        }).catch(err => {
+            store.dispatch('LogOut').then(() => {
               Message.error(err)
               next({ path: '/' })
             })
           })
       } else {
         next()
-        // 娌℃湁鍔ㄦ�佹敼鍙樻潈闄愮殑闇�姹傚彲鐩存帴next() 鍒犻櫎涓嬫柟鏉冮檺鍒ゆ柇 鈫�
-        // if (hasPermission(store.getters.roles, to.meta.roles)) {
-        //   next()
-        // } else {
-        //   next({ path: '/401', replace: true, query: { noGoBack: true }})
-        // }
-        // 鍙垹 鈫�
       }
     }
   } else {
diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue
index 246670b..880f204 100644
--- a/ruoyi-ui/src/views/login.vue
+++ b/ruoyi-ui/src/views/login.vue
@@ -126,15 +126,12 @@
             Cookies.remove("password");
             Cookies.remove('rememberMe');
           }
-          this.$store
-            .dispatch("Login", this.loginForm)
-            .then(() => {
-              this.$router.push({ path: this.redirect || "/" });
-            })
-            .catch(() => {
-              this.loading = false;
-              this.getCode();
-            });
+          this.$store.dispatch("Login", this.loginForm).then(() => {
+            this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
+          }).catch(() => {
+            this.loading = false;
+            this.getCode();
+          });
         }
       });
     }

--
Gitblit v1.9.3